Skip to content

Framework and players

All entries are in editable/framework.lua.

EntryUse it whenReceivesReturns
frameworkThe wrong framework is picked (see framework: … in the console).—'qbx', 'qb', 'esx', 'ox', 'nd', 'vrp' or 'standalone'
getPlayerUnsupported frameworksrcPlayer table, or false if no character
getPlayerByCitizenIdUnsupported frameworkcitizenIdPlayer table (online or from the database), or false
getCitizenIdUnsupported frameworksrcCharacter id, or false
onlinePlayersUnsupported framework—{ { src = …, player = … }, … }
searchCharactersUnsupported frameworkquery, limitList of rows for offline search
editable/framework.lua
EditableServer.framework = {
custom = true,
fn = function()
return 'qb'
end,
}

Fiveops picks the first running resource in this order and switches over if a framework starts after it.

FrameworkResourceCharacter idNotes
Qboxqbx_corecitizenid
QBCoreqb-corecitizenid
ESXes_extendedusers.identifierNo gang system.
ox_coreox_corecharIdCash is the ox_inventory money item, bank is the character’s default account. Jobs and gangs are groups of type job and gang. ox_core has no revive of its own: an ambulance script or a native revive is used.
ND_CoreND_CorecharidThe job is the group marked as a job. No gang system. Works with the v2.3.2 release and the current main branch.
vRPvrpPassport (Creative Network), user_id (vRP 1.0, vRPex)Creative Network and vRP 1.0 / vRPex are told apart on their own. vRP 2, Creative v5 and vRP 0.5-based (Dunko) servers run as standalone. ox_inventory doesn’t support vRP, so inventory features are off.

Make framework return 'standalone' and turn on the five player entries together. They return this table:

{
citizenId = 'ABC12345', -- required, permanent character id
firstName = 'John', lastName = 'Doe',
cash = 1500, bank = 20000,
job = { name = 'police', label = 'Police', grade = 3, gradeLabel = 'Sergeant', isBoss = false, onDuty = true },
gang = nil, -- or { name, label, grade, gradeLabel, isBoss }
isDead = false,
_src = 12, -- server id while online, nil when offline
offline = true, -- only when read from the database
}
editable/framework.lua
EditableServer.getPlayer = {
custom = true,
fn = function(src)
local p = exports['my_core']:GetPlayer(src)
if not p then return false end
return { citizenId = p.charId, firstName = p.firstName, lastName = p.lastName,
cash = p.cash, bank = p.bank, job = {}, isDead = p.dead == true, _src = src }
end,
}

Each entry’s comment in the file has a full example.