esx-framework

Installation
SKILL.md

ESX Framework

Server/client API for ESX Legacy: xPlayer, PlayerData, callbacks, events, jobs and money.

Activation Contract

Load this skill when the user creates or edits an ESX resource, touches xPlayer or ESX.PlayerData, needs jobs, money, accounts, items or weapons through ESX, or asks about ESX callbacks, events or best practices.

Hard Rules

  • Get the object with ESX = exports['es_extended']:getSharedObject(). On the client, wait for ESX and ESX.IsPlayerLoaded() before reading ESX.PlayerData.
  • xPlayer exists on the SERVER only (ESX.GetPlayerFromId(source)). ESX.PlayerData exists on the CLIENT only.
  • Always nil-check: if not xPlayer then return end before calling any method.
  • Money, items, weapons, jobs and metadata are mutated on the server through xPlayer.* methods, never from the client.
  • Pass a reason to addMoney, removeMoney, addAccountMoney, removeAccountMoney.
  • Client callbacks (ESX.TriggerClientCallback, ESX.AwaitClientCallback) must never decide anything sensitive: the client can fake the answer.
  • Use ESX.SecureNetEvent for client events that only the server may trigger.
  • Prefer ox_lib for notifications, menus, dialogs and progress bars over ESX UI.
  • Cache PlayerPedId() and update on esx:playerPedChanged; never Wait(0) loops without need.
Installs
237
GitHub Stars
15
First Seen
Feb 21, 2026
esx-framework — germanfndez/fiveai-skills