es_extended (ESX Legacy) for FiveM
The original FiveM roleplay framework, still running a very large share of live servers — jobs, money, society accounts and a huge script catalogue.
ESX is the older of the two dominant roleplay frameworks and the one with the deepest back catalogue of free scripts. Modern ESX is distributed as es_extended inside the esx_core monorepo; the 1.1 and 1.2 forks people still link to are years out of date and should not be used for a new server.
At a glance
| Maintainer | ESX Framework |
| Latest release | 1.15.2 · 2026-09-06 |
| Last code change | 2026-09-07 |
| Licence | see the repository |
| Written in | Lua |
| GitHub stars | 449 |
| Status | Active |
Figures read from the repository on 2026-09-22.
Why servers run it
- The largest catalogue of free, ready-made jobs and activities of any framework — most community scripts released between 2018 and 2022 target it.
- A simple, stable API. ESX.GetPlayerFromId, xPlayer.addMoney, xPlayer.addInventoryItem — the surface has barely changed in years.
- Society accounts and job grades are built in, which is most of what a roleplay economy needs.
- Modern ESX supports ox_inventory and ox_lib directly, so you are not locked out of the current ecosystem by choosing it.
Installing es_extended (ESX Legacy)
1. Use esx_core, not an old fork
Download the current release of esx-framework/esx_core. Anything labelled ESX 1.1 or 1.2 from a random repository is abandoned.
2. Import the SQL
The release contains the schema for users, jobs, items and addon accounts. Import it into an empty database before first start.
3. Install oxmysql
Modern ESX uses oxmysql. mysql-async still works through a shim but is no longer the default.
4. Set the load order
ensure oxmysql, then es_extended, then everything that calls it. ESX resources that start before the core get a nil object.
5. Configure the convars
server.cfg carries the ESX convars — locale, starting money, inventory choice. Read them once rather than editing config files that later releases overwrite.
Working examples
Giving a weapon the ESX way
ESX = exports['es_extended']:getSharedObject()
RegisterCommand('giverifle', function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return end
xPlayer.addWeapon('WEAPON_CUSTOMRIFLE', 120)
end, false)With ox_inventory installed, weapons are items
-- When ox_inventory handles the inventory, do not use xPlayer.addWeapon:
-- go through the inventory so the metadata and durability are created.
exports.ox_inventory:AddItem(source, 'WEAPON_CUSTOMRIFLE', 1, {
durability = 100,
serial = ESX.GetRandomString(8),
})A job check before a weapon shop opens
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.getJob().name ~= 'police' then
return TriggerClientEvent('esx:showNotification', source, 'Not authorised')
endWhat goes wrong
getSharedObject, not the old event. TriggerEvent('esx:getSharedObject', ...) is legacy; current ESX exposes exports['es_extended']:getSharedObject().
Do not mix xPlayer.addWeapon with ox_inventory. One writes to the game's weapon system, the other to the inventory. Using both produces guns the inventory does not know about.
Never run ESX and QBCore on the same server. They both claim the player object and both will start; the server then fails in ways that look like a script bug.
Old tutorials assume ESX 1.1. Function names and file layout changed in Legacy. If a snippet references esx_inventoryhud or es_extended/server/classes, it predates the version you are running.
es_extended (ESX Legacy) — questions people ask
ESX or QBCore in 2026?
Does ESX work with ox_inventory?
Where is the official ESX documentation?
Runs alongside
The roleplay framework most new FiveM servers are built on, with the largest modern script ecosystem and a one-click txAdmin recipe.
The slot-based inventory most new FiveM servers start with, with first-class support for addon weapons, durability, metadata and shops.
The MySQL wrapper the modern FiveM stack runs on: promise-based, prepared-statement aware and a drop-in replacement for mysql-async.
The shared library half the modern FiveM ecosystem depends on: menus, notifications, progress bars, zones, callbacks and a cache.