FiveM Framework API Reference
QBCore, ESX and ox functions in one place — with real examples and the pitfalls to avoid. No more digging through scattered GitHub readmes.
48 of 48
QBCore.Functions.GetPlayerDataReturns the local player's data table on the client — job, money, metadata, charinfo, and more. The go-to way …
QBCore.Functions.GetPlayerReturns the server-side Player object for a given source (server ID). This is the authoritative player object …
ESX.GetPlayerDataReturns the local player's data on the client in ESX — job, accounts, inventory, and more.
ESX.GetPlayerFromIdReturns the server-side xPlayer object for a given source. The authoritative ESX player object for money, jobs…
ox_inventory:AddItemAdds an item to a player's inventory (or any inventory) via ox_inventory's server export. The standard way to …
ox_inventory:RemoveItemRemoves an item from an inventory via ox_inventory's server export. Use it to take items when a player sells, …
Player.Functions.AddMoneyAdds money to a player's account (cash, bank, or crypto). Called on the server-side Player object. The correct…
Player.Functions.RemoveMoneyRemoves money from a player's account. Returns false if they don't have enough — always check it before giving…
Player.Functions.SetJobSets a player's job and grade. The standard way to change jobs in QBCore, used by job centers and admin tools.
QBCore.Functions.CreateUseableItemRegisters a callback that runs when a player uses a given item. The standard way to make items do something in…
xPlayer.setJobSets an ESX player's job and grade on the server-side xPlayer object.
xPlayer.addMoneyAdds money to an ESX player's primary account (usually cash/money). For bank use addAccountMoney('bank', amoun…
lib.notifyShows a notification using ox_lib. A clean, modern replacement for framework-specific notify functions, usable…
lib.progressBarShows a progress bar and yields until it finishes or is cancelled. Returns whether it completed. Standard for …
lib.callback / lib.callback.awaitType-safe client↔server callbacks via ox_lib. Cleaner than manual event round-trips for request/response patte…
exports.ox_target:addBoxZoneAdds a box-shaped interaction zone with ox_target. Players get an eye/interaction prompt inside it. The modern…
Player.Functions.AddMoneyAdds money to a player's account (cash, bank, or crypto). Called on the server-side Player object. The correct…
Player.Functions.RemoveMoneyRemoves money from a player's account. Returns false if they don't have enough — always check the return befor…
Player.Functions.SetJobSets a player's job and grade. The standard way to hire/fire or change someone's job in QBCore.
QBCore.Functions.CreateCallbackRegisters a server callback the client can call and await a response from — the clean request/response pattern…
QBCore.Functions.NotifyShows a notification to the player. Works client-side directly, or server-side by passing the source.
exports['es_extended']:getSharedObjectGets the ESX shared object. On ESX 1.9+ this export is the correct, current way — replacing the old TriggerEve…
xPlayer.removeMoneyRemoves money from a player's main account in ESX. Check the player can afford it first.
xPlayer.removeAccountMoneyRemoves money from a named ESX account such as bank or black_money. Check that the account exists and has enou…
ESX.ShowNotificationShows a notification to the local player in ESX.
QBCore.Functions.SpawnVehicleSpawns a vehicle client-side in QBCore, handling model loading and networking for you, then returns the vehicl…
QBCore.Functions.GetPlayersReturns a list of all online players' server IDs in QBCore. Used for admin tools, announcements, and iterating…
Player.Functions.AddItemAdds an item to a player's inventory in QBCore's native inventory. (On ox_inventory servers, use the ox_invent…
ESX.RegisterServerCallbackRegisters a server callback in ESX that clients can call and await a value from — ESX's request/response patte…
ESX.GetPlayersReturns all online players' server IDs in ESX. Used for admin actions, broadcasts, and iterating the server.
xPlayer.addInventoryItemAdds an item to a player's inventory in ESX's native inventory. (On ox_inventory servers, use the ox_inventory…
QBCore:Client:OnPlayerLoadedClient event fired when the player is fully loaded into QBCore. The correct place to first read PlayerData — r…
QBCore:Client:OnJobUpdateClient event fired when the player's job changes. Keep your cached PlayerData.job in sync by handling it (newe…
esx:playerLoadedClient event fired when the ESX player is fully loaded, delivering the xPlayer/PlayerData. The right moment to…
QBCore.Functions.GetIdentifierReturns a specific identifier (license, steam, discord, etc.) for a player source in QBCore. Commonly used to …
ox_inventory:GetItem / SearchReads what a player has in ox_inventory — get the count/metadata of an item, or search their inventory. Use be…
Player.Functions.SetMetaDataSets a metadata value on a QBCore player (hunger, thirst, stress, etc.). The standard way to update status and…
QBCore.Commands.AddRegisters a command with built-in permission levels in QBCore. Cleaner than raw RegisterCommand for admin/job …
ESX.RegisterUsableItemRegisters a useable item in ESX, running your callback when used. The ESX equivalent of a consumable/tool hook…
ESX.GetPlayerFromIdentifierFinds an online xPlayer by their identifier (license). Useful when you have a stored identifier rather than a …
ox_inventory:RegisterStashRegisters a stash inventory (storage) in ox_inventory — for houses, jobs, trunks, and shared storage.
QBCore.Shared.ItemsThe table of all defined items in QBCore. Read it to look up an item's label, weight, and metadata, e.g. when …
QBCore.Shared.JobsThe table of all defined jobs and their grades in QBCore. Used to validate jobs and read grade info.
ESX.TriggerServerCallbackClient-side call that invokes a registered ESX server callback and awaits its response. Pairs with ESX.Registe…
lib.registerContext / showContextBuilds and shows a context menu with ox_lib — the modern menu system used by many scripts for clean, themeable…
ox_inventory hooks (registerHook)Register hooks that fire on inventory actions (swap, use, buy) in ox_inventory — the modern way to gate or rea…
Player.Functions.GetItemByNameGets a player's item (and amount) by name in QBCore's inventory. Check before removing or gating actions on ha…
QBCore.Functions.GetPlayerByCitizenIdFinds an online player by their unique CitizenID (the stable character identifier in QBCore). Useful when you …