3 min read
qb-core
qb-core is the central QBCore framework resource. It owns the core object, player lifecycle and
persistence, shared definitions, callbacks, commands, permissions and framework events used by the
rest of the ecosystem.
This page is an orientation map. Use the dedicated API pages for exact current signatures.
Install and start
The official txAdmin recipe installs qb-core and imports the QBCore schema. For a normal QBCore
deployment, prefer that recipe over manually assembling a server from unrelated forks.
The generated resource order starts the core before the [qb] resource group:
ensure qb-core
ensure [qb]See QBCore server.cfg and Resource load order.
Core object
Client or server resources can cache the core object:
local QBCore = exports['qb-core']:GetCoreObject()Request only the sections you need when practical:
local QBCore = exports['qb-core']:GetCoreObject({ 'Functions', 'Shared' })See Core Object for filtering, direct function exports and client/server boundaries.
Player data and methods
Server code gets an authoritative connected player object with:
local Player = exports['qb-core']:GetPlayer(source)
if not Player then return end
print(Player.PlayerData.citizenid)
print(Player.PlayerData.job.name)Money, job, gang and metadata changes should go through the player methods exposed by the deployed
core revision. Inventory item methods are added by qb-inventory when that resource is running;
do not treat inventory behavior as permanently owned by qb-core.
See Player Data and Server Functions.
Shared definitions
qb-core/shared/ contains the framework's shared definitions such as items, jobs, gangs, vehicles,
weapons and locations.
Read them through QBCore.Shared or the current shared export surface:
local QBCore = exports['qb-core']:GetCoreObject({ 'Shared' })
local police = QBCore.Shared.Jobs.policeSee Shared Data and Shared Mutation Exports.
Functions
The current core separates client and server helper functions.
On the server, current QBCore.Functions includes player lookup, callbacks, usable-item handling,
permissions, routing buckets, vehicle helpers and other framework utilities. Current functions are
also exported by name from the core server runtime.
Do not copy a function list from an old fork: check the deployed source revision.
Events
Core lifecycle and synchronization events are documented separately:
An event emitted by qb-inventory, qb-policejob or another resource is not a qb-core event just
because it uses QBCore data.
Commands and permissions
QBCore.Commands.Add registers framework commands and integrates with the ACE-backed permission
model.
See:
Current default permission groups are god, admin and mod, configured in
QBCore.Config.Server.Permissions.
Database ownership
The repository includes qbcore.sql, which defines the core schema used by the recipe. Do not
invent additional core tables because a third-party resource happens to use them.
See Database guide and Core schema.
Common integration pattern
local QBCore = exports['qb-core']:GetCoreObject({ 'Functions' })
RegisterNetEvent('example:server:doThing', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
-- Validate protected state on the server before changing it.
end)For networked actions, follow the Safe Server Events and Server Authority Checklist.
Troubleshooting
| Symptom | Check |
|---|---|
No such export GetCoreObject | Confirm the correct qb-core resource is installed and started before the caller. |
| A function from a tutorial is nil | Compare the tutorial with your deployed qb-core revision; APIs change. |
| Inventory methods are missing | Confirm qb-inventory is running and that your revision adds those player methods. |
| Admin command denied | Inspect ACE principals and QBCore permission inheritance. |
| Player data is nil on client startup | Wait for the player lifecycle rather than assuming character data exists before load. |
Sources
- qb-core repository
- qb-core config
- Server functions
- Server exports
- Server events
- Official QBCore docs source
Verified against current upstream source on 2026-09-27.
Found an issue in this guide?
Send the page URL, the affected example, and a source or reproduction to the site maintainer. For a server or resource problem, use the support guide.
Marketplaces
Compare FiveM script marketplaces, QBCore source repositories and community releases. Verify sellers, licenses, updates and dependencies before buying.
qb-core Events and Functions Reference
Source-checked QBCore lifecycle events, player lookup return types, and client/server examples for a pinned core revision.
