Skip to the content
Docs

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

lua
Config.Framework = 'auto'   -- 'auto' | 'qb-core' | 'qbx_core' | 'esx'
ValueWhat 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 panelQBCore / QboxESX
Character nameFirst and last name of the characterThe name ESX has for the player
Citizen IDThe citizen IDThe ESX identifier
Job, grade, on dutyYesYes
MoneyEvery account of the playerEvery ESX account. The ESX money account is shown as "cash"
CallsignYesNo
Status Dead or downedYesYes
Status HandcuffedYesNot connected: a marked place in bridge/framework_server.lua
Give Money / Take MoneyYesYes
Set JobYesYes. ESX checks first that the job and grade exist
Offline searchName, citizen ID or license, in the players tableName or identifier, in the users table
Offline profileJob, grade, money, callsignJob, grade number, money

Page for the setting: General. Changing how the panel reads your characters: Bridge Files.

Inventory

lua
Config.InventorySystem = 'qb-inventory'   -- 'qb-inventory' | 'ox_inventory' | 'codem-inventory'

How the panel picks the inventory:

  1. The inventory in Config.InventorySystem, when that resource is running.
  2. If it is not running: the first of ox_inventory, qb-inventory, codem-inventory that is running.

So a server that forgot to change the setting still gives items.

What depends on the inventory

Button on a playerNeedsWithout it staff see
Give Itemox_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."
Inventoryox_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 ]] --.

  1. Set Config.InventorySystem to the folder name of your inventory.
  2. Add one elseif line at the marked place in Inventory.AddItem. That is the one Give Item uses. Write the name in lower case there: the panel reads the setting in lower case.
  3. Restart 5code-adminpanel.
lua
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
end

my-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.