Skip to main content

Player Related Functions

ESX.GetPlayerData

Returns all of the player data.

ESX.GetPlayerData()
  • return? table
info

Example using ESX.GetPlayerData function

local playerData = ESX.GetPlayerData()
print(json.encode(playerData, { indent = true }))
tip

if your script uses @es_extended/imports.lua in fxmanifest, you can also get the player data by calling ESX.PlayerData as well

Example using ESX.PlayerData

local playerData = ESX.PlayerData
print(json.encode(playerData, { indent = true }))