QBCore Frameworkqbcore.netCommunity docs
On this page

3 min read

QBCore server events

This reference is pinned to the current server/events.lua and server/player.lua.

Server event validation and state changes

Conceptual diagram; verify the behavior against your installed resource version.

Network handlers registered in server/events.lua

EventArgumentsCurrent server behavior
QBCore:Server:CloseServerreasonRequires admin; closes joins and kicks players lacking the whitelist permission
QBCore:Server:OpenServernoneRequires admin; reopens the server
QBCore:Server:TriggerClientCallbackname, ...Resolves a pending server→client callback
QBCore:Server:TriggerCallbackname, ...Invokes a callback registered with CreateCallback
QBCore:UpdatePlayernoneApplies hunger/thirst decay, synchronizes metadata, and saves; rate-limited per source
QBCore:ToggleDutynoneToggles the caller's current job duty state
QBCore:Server:OnPlayerLoadednoneConfirms the source is loaded, then emits the client loaded event
QBCore:CallCommandcommand, argsResolves the registered command and checks its command.<name> ACE before invoking it

QBCore:Server:TriggerCallback is a transport mechanism, not automatic authorization. Every callback that returns sensitive data or changes state must validate the calling source and client-supplied arguments.

The same file also handles playerConnecting, playerDropped, resource cleanup, and baseevents:* vehicle events through normal FiveM event handlers.

Integration events

EventArgumentsMeaning
QBCore:Server:PlayerLoadedplayerA server-side player object finished loading.
QBCore:Server:OnPlayerUnloadsourceA player session was unloaded.
QBCore:Server:PlayerDroppedsourceA network player dropped.
QBCore:Server:OnPlayerUpdatedsource, key, valueOne field or the full player data changed.
QBCore:Server:OnJobUpdatesource, jobJob data changed.
QBCore:Server:OnGangUpdatesource, gangGang data changed.
QBCore:Server:SetDutysource, onDutyDuty state changed.
QBCore:Server:OnMoneyChangesource, moneyType, amount, operation, reasonMoney was added, removed, or set.
QBCore:Server:UpdateObjectnoneShared jobs, items, or gangs changed.
AddEventHandler('QBCore:Server:OnPlayerUnload', function(playerSource)
    activeRoutes[playerSource] = nil
end)

AddEventHandler('QBCore:Server:OnPlayerUpdated', function(playerSource, key, value)
    if key == 'job' then
        refreshJobAccess(playerSource, value)
    end
end)

There is no current core QBCore:Server:PlayerLoggedOut or QBCore:Server:SetPlayerData event. QBCore:Server:UpdateObject has no payload; reacquire the exported core object if a resource caches shared tables.

Never expose a server event that grants money, items, jobs, or permissions without checking the calling source and validating every client-supplied value.

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.

On this page

Leonida RP server website built with RPWebsite
RPWebsite

Advertisement · RPWebsite

Want a website for your server?

Launch a site with live player status, rules, and a join button in minutes.

Build your website