Frameworks & Inventories
On this page5
Which frameworks and inventories the panel works with, what it finds by itself, and what each one gives the panel.
Framework
Config.Framework = 'auto' -- 'auto' | 'qb-core' | 'qbx_core' | 'esx'| Value | What happens |
|---|---|
'auto' (default) | The panel looks for a running framework: first Qbox (qbx_core), then ESX (es_extended). When neither runs, it uses QBCore. |
'qb-core' | Always QBCore. |
'qbx_core' | Always Qbox. |
'esx' | Always ESX. |
The panel needs one of these three frameworks. There is no standalone mode.
What each framework gives the panel
| In the panel | QBCore / Qbox | ESX |
|---|---|---|
| Character name | First and last name of the character | The name ESX has for the player |
| Citizen ID | The citizen ID | The ESX identifier |
| Job, grade, on duty | Yes | Yes |
| Money | Every account of the player | Every ESX account. The ESX money account is shown as "cash" |
| Callsign | Yes | No |
| Status Dead or downed | Yes | Yes |
| Status Handcuffed | Yes | Not connected: a marked place in bridge/framework_server.lua |
| Give Money / Take Money | Yes | Yes |
| Set Job | Yes | Yes. ESX checks first that the job and grade exist |
| Offline search | Name, citizen ID or license, in the players table | Name or identifier, in the users table |
| Offline profile | Job, grade, money, callsign | Job, grade number, money |
Page for the setting: General. Changing how the panel reads your characters: Bridge Files.
Inventory
Config.InventorySystem = 'qb-inventory' -- 'qb-inventory' | 'ox_inventory' | 'codem-inventory'How the panel picks the inventory:
- The inventory in
Config.InventorySystem, when that resource is running. - If it is not running: the first of
ox_inventory,qb-inventory,codem-inventorythat is running.
So a server that forgot to change the setting still gives items.
What depends on the inventory
| Button on a player | Needs | Without it staff see |
|---|---|---|
| Give Item | ox_inventory, qb-inventory or codem-inventory. On ESX without one of them: ESX's own inventory | "The item could not be given. Check the name and their free space." |
| Inventory | ox_inventory | "Opening an inventory works with ox_inventory only." |
Both buttons are explained on Player Actions.
Adding another inventory
bridge/inventory.lua is open. It has marked places: -- [[ ADD YOUR INVENTORY HERE ]] --.
- Set
Config.InventorySystemto the folder name of your inventory. - Add one
elseifline at the marked place inInventory.AddItem. That is the one Give Item uses. Write the name in lower case there: the panel reads the setting in lower case. - Restart
5code-adminpanel.
function Inventory.AddItem(src, item, amt)
amt = amt or 1
local sys = system()
if sys == 'ox_inventory' then
return exports.ox_inventory:AddItem(src, item, amt)
elseif sys == 'codem-inventory' then
return exports['codem-inventory']:AddItem(src, item, amt)
elseif sys == 'my-inventory' then -- your inventory
return exports['my-inventory']:AddItem(src, item, amt) -- use the export from its own docs
else -- qb-inventory, or ESX's own inventory
-- leave the lines that are here as they are
end
endmy-inventory and its export are placeholders. Return true when the item was given and false
when it was not. The Inventory button stays ox_inventory only.