QBCore and Qbox

QBCore vs Qbox: what changes for your scripts

Qbox started as a fork of QBCore, and it still runs most QBCore scripts. The ones that fail usually fail for the same few reasons. Here is what carries over, what does not, and what to check before you put a QBCore script on a Qbox server.

What Qbox is, next to QBCore

Qbox is a FiveM roleplay framework that began as a QBCore fork in 2022. Its core resource is qbx_core, where QBCore's is qb-core, and it hands three jobs to the ox resources instead of keeping its own: the inventory, the third-eye target, and menus.

PartQBCoreQbox
Coreqb-coreqbx_core
Inventoryqb-inventoryox_inventory
Targetqb-targetox_target
Menus, input, progress barsqb-menu, qb-input, progressbarox_lib
Database libraryoxmysqloxmysql

The largest change for code is that Qbox has no core object. A QBCore script fetches one object and calls everything through it. A script written for Qbox calls qbx_core exports directly, and uses ox_lib and ox_inventory for the rest.

What still works

qbx_core answers to the name qb-core: its manifest declares provide 'qb-core'. A script that lists qb-core as a dependency starts normally, and the usual first line of a QBCore script keeps working:

server.lua
-- QBCore, and Qbox through its bridge
local QBCore = exports['qb-core']:GetCoreObject()
local Player = QBCore.Functions.GetPlayer(source)

That object comes from the bridge, a compatibility layer inside qbx_core. Its functions call qbx_core and ox_inventory underneath. The Qbox docs list what the bridge keeps working:

  • QBCore events such as QBCore:Client:OnPlayerLoaded and QBCore:Client:OnJobUpdate.
  • QBCore callbacks.
  • Player.Functions.AddItem, RemoveItem and QBCore.Functions.HasItem, which go through ox_inventory.
  • QBCore.Functions.Notify and QBCore.Functions.Progressbar.

The bridge is on by default and stays on unless server.cfg sets qbx:enablebridge to "false". The server.cfg in the Qbox docs sets it to "true". Rewriting a script for Qbox is optional, and QBCore calls and Qbox calls can sit side by side in one resource.

What does not exist on Qbox

The bridge answers for qb-core. It does not stand in for qb-inventory, qb-target or qb-menu, and qbx_core itself has no core object to hand out:

server.lua
-- Fails: qbx_core has no GetCoreObject export
local QBCore = exports.qbx_core:GetCoreObject()

-- Qbox's own way: no core object, only exports
local player = exports.qbx_core:GetPlayer(source)
  • exports['qb-inventory'] and inventory:server: events: nothing on Qbox provides qb-inventory.
  • exports['qb-target']: ox_target only answers the older qtarget exports.
  • exports['qb-menu'] and exports['qb-input']: they fail unless those two resources are running.
  • exports['progressbar'] called directly. QBCore.Functions.Progressbar is fine.

Do not copy qb-core or qb-inventory onto a Qbox server to fill the gap. The Qbox docs say to leave them behind, and the item functions in qbx_core raise an error while qb-inventory is running.

Player data

Through the bridge, QBCore.Functions.GetPlayer(source) and QBCore.Functions.GetPlayerData() still return the player. Qbox's own calls are exports.qbx_core:GetPlayer(source) on the server and QBX.PlayerData on the client, which needs '@qbx_core/modules/playerdata.lua' in the script's client_scripts.

Two details differ even for a script that stays on the bridge:

  • Job and gang grades have number keys. grades[tostring(level)] gives nil on Qbox; grades[level] works.
  • PlayerData.items is empty. Items live in ox_inventory and have to be read from there.

A script that reads or writes the database itself needs a careful test: inventories, jobs and vehicles are stored differently on Qbox.

Items and inventory: ox_inventory

ox_inventory is not optional on Qbox: qbx_core checks for it when the server starts and shuts down without it. Items are defined in ox_inventory/data/items.lua. The old qbx_core/shared/items.lua is deprecated, and a script on the bridge sees the ox_inventory items through QBCore.Shared.Items.

Item data has other field names. ox_inventory uses count and metadata where QBCore code reads amount and info, and that is what a usable-item callback receives on Qbox. In Qbox's own style, item calls go straight to ox_inventory, with a carry check first, because AddItem alone can exceed the weight limit:

server.lua
local item, count = 'bandage', 2
if not exports.ox_inventory:CanCarryItem(source, item, count) then return end
exports.ox_inventory:AddItem(source, item, count)

Callbacks: ox_lib

QBCore callbacks keep working through the bridge. Scripts written for Qbox use ox_lib's instead: lib.callback.register on the server, where the handler returns its answer, and lib.callback.await on the client.

server.lua and client.lua
-- server
lib.callback.register('garage:getVehicles', function(source, garageId)
    return vehicles[garageId]
end)

-- client: the second argument is a delay, not data
local list = lib.callback.await('garage:getVehicles', false, 'pillbox')

Anything that calls lib needs lua54 'yes' and '@ox_lib/init.lua' in the shared_scripts of its fxmanifest.lua. Without the import, lib is nil and the first call errors.

Common errors when a QBCore script runs on Qbox

What you seeWhyWhat to do
No such export GetCoreObject in resource qbx_coreThe script asks qbx_core for a core object.Call exports['qb-core']:GetCoreObject() instead.
Could not find dependency qb-target for resource …Its fxmanifest.lua lists a QBCore resource that Qbox does not provide.Switch the script to ox_target or ox_inventory in its config, or get its Qbox version.
attempt to call a nil value (field '…') on a QBCore functionThe installed qbx_core may be too old to cover that function.Update qbx_core first.
A call to exports['qb-inventory'] or exports['qb-target'] failsNothing on Qbox answers to those names.Use the ox option in the config, or a version written for ox_inventory and ox_target.
A job check finds no gradeThe script looks up grades[tostring(level)]; Qbox keys grades by number.Change it to grades[level].
An item's amount or info is nil in a usable-item callbackox_inventory sends count and metadata.Read count and metadata.

Checklist before you install a QBCore script on Qbox

  1. 1.Open its config. If it has a framework setting, choose qbx or qbox when offered, otherwise qb. Set the inventory to ox_inventory, the target to ox_target, and menus, progress bars and notifications to ox_lib.
  2. 2.Open fxmanifest.lua and read the dependencies. qb-core is fine. qb-inventory or qb-target means the script will not start as it is.
  3. 3.Search every file for qb-inventory, inventory:server:, qb-target, qb-menu, qb-input and exports['progressbar'].
  4. 4.Look for a .fxap file. It means the code is encrypted and only the config can be changed; with no ox option there, ask the author for a Qbox version.
  5. 5.Note whether it reads or writes the database itself, and test those parts with care.
  6. 6.Add one script at a time on a test server, restart, and read the console before you add the next.

Check the script before you install it

Paste the files or upload the zip. The Script Checker lists manifest problems, Lua that does not compile, core exports that do not exist — exports.qbx_core:GetCoreObject() among them — and lib or MySQL used without their import. No account, and your code is not kept.

Check your resource with the free Script Checker

Or generate a script written for Qbox

Sources

Checked against the Qbox docs and qbx_core 1.24.1 on 20 November 2026.