Updated 29 November 2026
Most ESX scripts convert to QBCore by replacing a small set of calls. Work through the script file by file and test after each part. Only convert resources you own or whose licence allows modification: escrow-protected scripts cannot be edited.
Getting the framework object
-- ESX
local ESX = exports['es_extended']:getSharedObject()
-- QBCore
local QBCore = exports['qb-core']:GetCoreObject()Conversion table
| What | ESX | QBCore |
|---|---|---|
| Player (server) | ESX.GetPlayerFromId(src) | QBCore.Functions.GetPlayer(src) |
| Job name | xPlayer.job.name | Player.PlayerData.job.name |
| Cash | xPlayer.getMoney() / xPlayer.addMoney(n) | Player.PlayerData.money.cash / Player.Functions.AddMoney('cash', n) |
| Bank | xPlayer.getAccount('bank').money | Player.PlayerData.money.bank |
| Remove money | xPlayer.removeMoney(n) | Player.Functions.RemoveMoney('cash', n) |
| Give item | xPlayer.addInventoryItem(name, n) | Player.Functions.AddItem(name, n) |
| Remove item | xPlayer.removeInventoryItem(name, n) | Player.Functions.RemoveItem(name, n) |
| Server callback | ESX.RegisterServerCallback(name, fn) | QBCore.Functions.CreateCallback(name, fn) |
| Call it (client) | ESX.TriggerServerCallback(name, cb, ...) | QBCore.Functions.TriggerCallback(name, cb, ...) |
| Player loaded (client) | RegisterNetEvent('esx:playerLoaded') | RegisterNetEvent('QBCore:Client:OnPlayerLoaded') |
| Notify (client) | ESX.ShowNotification(msg) | QBCore.Functions.Notify(msg) |
Database differences
ESX keeps jobs and grades in the jobs and job_grades tables. QBCore defines jobs in qb-core/shared/jobs.lua. Items move from the ESX items table to qb-core/shared/items.lua (or your inventory resource). Copy each item and job definition across before testing.
Qbox
Qbox ships a compatibility layer for many QBCore calls, so a QBCore conversion often runs on Qbox as it is. For new code, Qbox recommends its own exports (for example exports.qbx_core:GetPlayer(src)) and ox_lib. Check the Qbox documentation for the version you run.
Test checklist
- No SCRIPT ERROR lines in the server or F8 console after ensure.
- Money and items change exactly once per action (no duplicates).
- Every purchase checks price and balance on the server, not only in the client.
- Job checks use the QBCore job name and grade.
FiveDev can do the conversion inside your server: ask it to convert a resource you own, review every changed line and restore with one click if something breaks.