What ESX Legacy is, how to install and update it: a server owner's guide (2026)
ESX Legacy (es_extended) is the most used RP framework on FiveM. This guide covers the es_extended structure, database tables, ensure order in server.cfg, updating without breaking existing scripts, the known problems of 1.13.x, and the free drop-in alternative ESX Legacy Core X3D Build.
ESX Legacy is the roleplay framework for FiveM that continues the original ESX. Its core is the es_extended resource, which every RP script on an ESX server calls for player data, money, items, jobs, weapons and client-server callbacks. Most servers run ESX Legacy 1.x because most commercial and community scripts support ESX first.
Related scripts
Structure you need to know
| Part | Role |
|---|---|
es_extended |
Core: xPlayer, three accounts (money / bank / black_money), inventory, loadout, jobs, callbacks, saving |
esx_* addons |
Police, EMS, mechanic, shops, garages and so on; each calls ESX. via @es_extended/imports.lua |
oxmysql |
The MySQL/MariaDB connector ESX Legacy uses |
users table |
Player rows: identifier, accounts (JSON), inventory (JSON), loadout (JSON), job, position, skin |
items, jobs, job_grades, owned_vehicles |
Standard tables most addons expect |
First install
- Install FXServer (latest recommended artifact) and MySQL/MariaDB
- Put
oxmysqlandes_extendedinresources/, runes_extended.sqlon a fresh database - Set
set mysql_connection_stringinserver.cfg - The
ensureorder matters:
ensure oxmysql
ensure es_extended
# only after this, ensure scripts that use @es_extended/imports.lua
ensure x3d_notify
ensure x3d_progressbar
ensure esx_ambulancejob
- Join once; your character row is created in
users. Grant admin withadd_principal identifier.license:xxx group.admin
Updating without breaking existing scripts
- Back up the
es_extendedfolder and dump the database every time - Read the new version's changelog for SQL migrations (1.10 → 1.11 moved identifiers to license, for example)
- Do not edit files inside
es_extendeddirectly; if you must, use a fork that tracks its changes (next section) or the next update overwrites them - Scripts using
ESX.GetPlayerFromId/xPlayer.getInventoryItem/TriggerServerCallbackkeep working across 1.x as long as the resource is still namedes_extended
Known problems of 1.13.x on real servers
- Saves on disconnect only: a crash rolls everyone back to login
- Corrupt coordinates on disconnect: the ped is culled before the save,
(0,0,0)and health0are written over the row, next login spawns at origin or dead - Leaking callbacks: unanswered
ESX.TriggerServerCallbackrequests stay in memory until restart - Empty item table for a session when MySQL comes up later than
es_extended - Nothing against pre-restart dupes, and no audit log of which script moved money or items
- Linear scans for accounts, items and weapons on every call; slower with every player
Details for each are in why an ESX server should replace the core.
The alternative: ESX Legacy Core — X3D Build
ESX Legacy Core — X3D Build is es_extended forked from 1.13.4 with every item above fixed. The resource is still called es_extended, so you drop it over the old one; every @es_extended/imports.lua and dependencies { 'es_extended' } keeps working, no script edits. Free, GPL v3 like upstream, every change listed in the README per GPL §5a.
Added: everyone saved every 10 minutes · position/health validated before saving · waits for ground before spawn · O(1) lookups · callbacks with timeouts · economy lock 10 minutes before restart · audit log plus Discord webhooks · ammo clamp · word filter · Config.Tables for custom table names · automatic nc_inventory/ox_inventory detection
Install: back up the old es_extended, drop the new folder in, start the server; no SQL if you already have an ESX database. Full docs.
Stock ESX UI to replace at the same time
esx_notify, esx_progressbar and esx_loadingscreen date from 2022: non-Latin fonts render as boxes, bars cannot be cancelled, the loading screen white-screens. X3D has free replacements for all three with forwarders for the old export names: replacing esx_notify / esx_progressbar / esx_loadingscreen.
FAQ
ESX vs ESX Legacy? "ESX Legacy" is the name of the continued ESX line since 2021 (esx-framework/esx_core). Every 1.x version is ESX Legacy; plain "ESX" today means this.
Does ox_inventory work with ESX Legacy? Yes, and it is popular; it replaces ESX's built-in inventory. The X3D Build detects it and points icons at it.
QBCore or ESX? If most scripts you want support ESX, pick ESX Legacy. Full comparison in QBCore vs ESX Legacy vs Qbox.
Free scripts for ESX? X3D gives away 16, all for ESX Legacy: see the free FiveM scripts post.
Related scripts
