Install a script on Qbox
Start order, ox_inventory items, the QBCore bridge and common pitfalls when you install an RPCrate script on a Qbox (qbx_core) FiveM server.
This page adds the Qbox-specific steps to the general installation. Background: Qbox framework guide and Qbox vs QBCore.
Requirements
- The product page shows the Qbox badge, or the QBCore badge and the description says it works on Qbox.
qbx_corewith its usual stack runs on your server:oxmysql,ox_libandox_inventory.
Start order
setr inventory:framework "qbx"
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure resource_nameFollow your Qbox template's own order for the core resources; add new scripts after them. The inventory framework convar belongs before resource startup. See the official ox_inventory Qbox setup.
QBCore scripts on Qbox
qbx_core provides a bridge for QBCore resources, so many QBCore scripts run unchanged. Scripts that call qb-inventory functions directly or edit qb-core files do not. Before you buy a QBCore-only script for Qbox, check the description for Qbox or ox_inventory support, or ask support.
Add the items
Qbox uses ox_inventory. Items are defined in ox_inventory/data/items.lua:
['example_item'] = {
label = 'Example Item',
weight = 100,
stack = true,
close = true,
description = 'Example',
},Copy the item images into ox_inventory/web/images/, named like the item (example_item.png). Restart the server.
For new installations, convert the supplied QBCore item definitions to the ox_inventory format and register each item once.
Qbox also has a compatibility path: with the QBCore bridge enabled, supported entries in qbx_core/shared/items.lua are converted on server restart. That file is deprecated; it is not the preferred place for new items, and the conversion does not replace manual setup of item actions such as client/server exports. Follow the installed release and the resource's instructions. Sources: Qbox item FAQ, qbx_core shared items.
Add jobs and gangs
Use the job or gang definitions supplied for your Qbox release, preserving the format in qbx_core/shared/jobs.lua and qbx_core/shared/gangs.lua. Match names and grades to the script's config. Do not copy QBCore core files over Qbox files. If a script manages jobs dynamically, follow its documented Qbox integration instead. See the Qbox compatibility FAQ.
Common Qbox problems
| Symptom | Likely cause |
|---|---|
| A QBCore script errors on inventory calls | It uses qb-inventory exports that ox_inventory does not have. Look for an ox_inventory option in the config. |
| Item has no image | The image is missing from ox_inventory/web/images/ or its file name differs from the item name. |
No such export in the console | The script calls an export of a resource that is not started or has a different name on your server. |
More: Startup errors.