Skip to Content
FrameworksEsxESX Structure

ESX Structure

Understanding how ESX is organized helps when developing resources.

Core Resources

  • es_extended: Core framework functionality
  • esx_basicneeds: Basic needs system
  • esx_ambulancejob: Ambulance job
  • esx_policejob: Police job

Player Data

Player data structure:

xPlayer = { identifier = "steam:...", accounts = { money = 5000, bank = 10000 }, job = { name = "unemployed", label = "Unemployed", grade = 0 } }

Exports

Common ESX exports:

-- Get player local xPlayer = ESX.GetPlayerFromId(source) -- Get player data local accounts = xPlayer.getAccounts() -- Add money xPlayer.addMoney(100) -- Remove money xPlayer.removeMoney(50)

Events

Common ESX events:

  • esx:playerLoaded - Player loaded
  • esx:playerDropped - Player disconnected
  • esx:onPlayerDeath - Player died
Last updated on