Wait for esx_xp to be ready:TriggerEvent("esx_xp:isReady", cb)Example:ESXP = false Citizen.CreateThread(function() while not ESXP do TriggerEvent("esx_xp:isReady", function(ready) ESXP = ready end) Citizen.Wait(10) end -- Do stuff with esx_xp end)-- SET INTITIAL XP TriggerEvent('...
Also remember that Citizen event handlers (used by Proxy and Tunnel) seem to not work while loading the resource, to use the Proxy at loading time, you will need to delay it with Citizen.CreateThread or a SetTimeout.DatabaseSQL queries are managed by DB drivers, you can use the default...
- [Native functions](https://runtime.fivem.net/doc/reference.html) - [Client functions](/scripting-reference/client-functions) - [Server functions](/scripting-reference/server-functions) <!-- TODO: - [Useful functions](/scripting-reference/useful-functions)--> - [Client events](/scripting-ref...
Wait for esx_xp to be ready:TriggerEvent("esx_xp:isReady", cb)Example:ESXP = false Citizen.CreateThread(function() while not ESXP do TriggerEvent("esx_xp:isReady", function(ready) ESXP = ready end) Citizen.Wait(10) end -- Do stuff with esx_xp end)-- SET INTITIAL XP TriggerEvent('...