ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
Framework API

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.

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