Framework · ESX Framework

es_extended (ESX Legacy) for FiveM

What it is

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.

Official documentation Repository All resources

At a glance

MaintainerESX Framework
Latest release1.15.2 · 2026-09-06
Last code change2026-09-07
Licencesee the repository
Written inLua
GitHub stars449
StatusActive

Figures read from the repository on 2026-09-22.

What sits on what in a modern FiveM serverFXServer runs the framework core, which sits on a MySQL wrapper; the inventory, library and targeting resources sit beside it, and the server's own scripts sit on top of all of them.Your own resources — jobs, shops, activities, HUDox_inventoryitems and weaponsox_libmenus, zones, callbacksox_targetinteractionFramework core — es_extended / qb-core / qbx_core / ox_coreoxmysqlprepared statements, poolingFXServer + txAdminprocess, restarts, bans
What sits on what in a modern FiveM server

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. 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. 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. 3. Install oxmysql

    Modern ESX uses oxmysql. mysql-async still works through a shim but is no longer the default.

  4. 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. 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')
end

What 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?
QBCore and Qbox have more momentum for new servers and a more modern codebase. ESX has the larger back catalogue of free scripts and a simpler API. Both are actively maintained; the deciding factor is usually which scripts you already own.
Does ESX work with ox_inventory?
Yes, and it is a common combination. Set the inventory convar and ESX hands item handling over to ox_inventory.
Where is the official ESX documentation?
documentation.esx-framework.org. It covers the server and client API, the events and the shared objects.

Runs alongside

qb-core (QBCore)

The roleplay framework most new FiveM servers are built on, with the largest modern script ecosystem and a one-click txAdmin recipe.

ox_inventory

The slot-based inventory most new FiveM servers start with, with first-class support for addon weapons, durability, metadata and shops.

oxmysql

The MySQL wrapper the modern FiveM stack runs on: promise-based, prepared-statement aware and a drop-in replacement for mysql-async.

ox_lib

The shared library half the modern FiveM ecosystem depends on: menus, notifications, progress bars, zones, callbacks and a cache.