Events and Callbacks
Net events, local events, callback names, and payload observations for sure-es_extended.
Events and Callbacks
This page lists the important callbacks and event contracts observed in the implementation.
Server callbacks registered through lib.callback.register
Legacy wrapper registration
ESX.RegisterServerCallback(name, cb) wraps lib.callback.register.
Built-in callback names
esx:getPlayerDataesx:isUserAdminesx:getGameBuildesx:getPlayerNamesesx:spawnVehicle
Client callback usage
The client also registers:
esx:getVehicleType
Client-to-server net events
Observed incoming server events:
esx:onPlayerJoinedesx:onPlayerSpawnesx:onPlayerDeathesx:updateWeaponAmmoesx:giveInventoryItemesx:removeInventoryItemesx:useItemesx:clientLog
Server-to-client net events
Observed outgoing client events:
esx:playerLoadedesx:registerSuggestionsesx:setInventoryesx:setAccountMoneyesx:addInventoryItemesx:removeInventoryItemesx:addLoadoutItemesx:removeLoadoutItemesx:addWeaponComponentesx:removeWeaponComponentesx:setWeaponTintesx:setJobesx:setGroupesx:updatePlayerDataesx:executeCommandesx:requestModelesx:showNotificationesx:showAdvancedNotificationesx:showHelpNotificationesx:repairPedVehicleesx:tpmesx:killPlayeresx:freezePlayeresx:noclip
Local events observed on the server
esx:playerLoadedesx:playerDroppedesx:playerSavedesx:setJobesx:setGroupesx:setAccountMoneyesx:addAccountMoneyesx:removeAccountMoneyesx:onAddInventoryItemesx:onRemoveInventoryItemesx:jobsRefreshedesx:playerInventoryClearedesx:playerLoadoutCleared
Local events observed on the client
esx:onPlayerSpawnesx:onPlayerDeathesx:restoreLoadoutesx:loadingScreenOffesx:setPlayerData
Also used:
playerSpawnedskinchanger:modelLoadedonResourceStop
Event payload notes
esx:playerLoaded (server event)
Observed arguments:
source- static or proxy player wrapper
isNew
esx:playerLoaded (client event)
Observed arguments:
xPlayerpayload intended for the clientisNew
That payload includes cleaned client-safe data such as:
accountsinventoryClientloadoutcoordsskinmetadata
Several identity and server-only fields are removed before the payload is sent.
esx:onPlayerDeath
Observed data payload contains:
victimCoordskilledByPlayerdeathCause- optional
killerCoords - optional
distance - optional
killerServerId - optional
killerClientId
esx:getPlayerData
Returned callback payload includes:
identifieraccountsinventoryjobloadoutmoneypositionmetadata
State bag synchronization
The client watches these state bag keys on its own player:
identifierdateofbirthnamefirstNamelastNameheightjobvariablesmetadatagroup
The server writes to state bags in ExtendedPlayer methods and constructor.
NUI events
Observed NUI-side events:
notification/setDefaultsnotification/addtoggleupdate
Observed NUI callbacks requested from the browser:
notification/readyreadyclose