ESXclient
ESX.GetPlayerData
ESX client documentation with a FiveM Lua example.
Summary
Returns the local player's data on the client in ESX — job, accounts, inventory, and more.
Returns
table — the player data (job, accounts, inventory, etc.)
Example
ESX = exports['es_extended']:getSharedObject()
local data = ESX.GetPlayerData()
print(data.job.name)
print(data.job.grade_label)Common pitfalls
- On ESX 1.9+ always get the object via
exports['es_extended']:getSharedObject()— the old TriggerEvent pattern is deprecated and causes 'attempt to index a nil value (global ESX)'. - Client-side data isn't authoritative — validate on the server.
Related functions
Related guides
Managing jobs on your server?
Viper Multi-Job lets players hold several jobs and switch between them with grade, salary and duty handled — QBCore, QBox and ESX, validated server-side.
See Viper Multi-Job →