Framework and players
All entries are in editable/framework.lua.
| Entry | Use it when | Receives | Returns |
|---|---|---|---|
framework | The wrong framework is picked (see framework: … in the console). | — | 'qbx', 'qb', 'esx', 'ox', 'nd', 'vrp' or 'standalone' |
getPlayer | Unsupported framework | src | Player table, or false if no character |
getPlayerByCitizenId | Unsupported framework | citizenId | Player table (online or from the database), or false |
getCitizenId | Unsupported framework | src | Character id, or false |
onlinePlayers | Unsupported framework | — | { { src = …, player = … }, … } |
searchCharacters | Unsupported framework | query, limit | List of rows for offline search |
EditableServer.framework = { custom = true, fn = function() return 'qb' end,}Built-in adapters
Section titled “Built-in adapters”Fiveops picks the first running resource in this order and switches over if a framework starts after it.
| Framework | Resource | Character id | Notes |
|---|---|---|---|
| Qbox | qbx_core | citizenid | |
| QBCore | qb-core | citizenid | |
| ESX | es_extended | users.identifier | No gang system. |
| ox_core | ox_core | charId | Cash 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_Core | ND_Core | charid | The job is the group marked as a job. No gang system. Works with the v2.3.2 release and the current main branch. |
| vRP | vrp | Passport (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. |
Unsupported frameworks
Section titled “Unsupported frameworks”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}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.