Qbox script generator for FiveM
Qbox is not QBCore with a new name. ScriptForge writes Qbox resources the Qbox way — qbx_core exports, ox_lib and ox_inventory — and delivers every file with a README and the results of its checks.
How it works
Select Qbox in ScriptForge and describe the resource. You can watch the manifest, client and server files, config and NUI page being written, then download the zip, read the README or send it to your server. Follow-up messages in the same chat change the resource; nothing is lost between versions.
Plan is optional and free: it lays out the files, events, config options and dependencies so you can correct the design before the build.
Native Qbox, not the QBCore bridge
qbx_core still answers old QBCore calls through a compatibility bridge, but that bridge is deprecated. Every Qbox build is given a framework profile, checked against qbx_core, ox_lib and ox_inventory's source, that keeps the code off it. Some of its rules:
- Get players from exports.qbx_core:GetPlayer(source) with a nil check, and pass the source as a number — a string is read as a citizenid.
- Move money with exports.qbx_core:AddMoney / RemoveMoney. A Qbox bank account has no floor, so compare the balance before a bank charge.
- Server callbacks use lib.callback.register; the client calls lib.callback.await(name, false, ...), because the second argument is a delay, not data.
- Items go through ox_inventory: CanCarryItem before AddItem, and RemoveItem's result is checked before anything is paid.
- Job grades are numbers, job types such as leo and ems are available, and usable items are registered with exports.qbx_core:CreateUseableItem.
- Spawn vehicles with qbx.spawnVehicle inside pcall; keys come from qbx_vehiclekeys, which takes the vehicle entity.
Checked like every build
Each resource is compiled as Lua 5.4 (FiveM's syntax extensions included), scanned for client-trusted payouts, purchases without a balance check, string-built SQL and commands without a permission check, and its manifest and NUI wiring are compared with the files. One automatic correction pass runs when a draft fails, and the README reports what the checks found.
No automatic check replaces a test run: try a new resource on a development server before going live.
Example: a Qbox hunting resource
The description, sent with Qbox selected:
“Hunting: buy a hunting license, hunt deer inside a configured hunting zone with a hunting rifle, skin carcasses (requires a knife) for meat and pelts, and sell them to a butcher. Killing deer outside the zone fines the player $2,000.”
The butcher's sell callback from the server file it wrote:
-- The client only names the item. Quantity comes from the server-side inventory count,
-- capped by Config.MaxSellAmount; the price comes from server-side Config.
lib.callback.register('qbx_hunting:server:sell', function(source, item)
local src = source
if type(item) ~= 'string' then return { ok = false, message = 'Invalid item.' } end
local entry = Config.SellItems[item]
if not entry then return { ok = false, message = 'Invalid item.' } end
local cid = getCitizenId(src)
if not cid then return { ok = false, message = 'Not logged in.' } end
if busy[src] then return { ok = false, message = 'Please wait.' } end
if onCooldown(src, 'sell', 1000) then return { ok = false, message = 'Slow down.' } end
if not nearLodge(src) then return { ok = false, message = 'You are too far from the butcher.' } end
busy[src] = true
local remaining = licenseRemaining(cid)
if not remaining or getCitizenId(src) ~= cid then
busy[src] = nil
return { ok = false, message = 'The butcher is unavailable.' }
end
if remaining <= 0 then
busy[src] = nil
return { ok = false, expired = true, licenseRemaining = 0, message = 'The butcher only buys from licensed hunters.' }
end
local owned = math.floor(tonumber(exports.ox_inventory:Search(src, 'count', item)) or 0)
local amount = math.min(owned, Config.MaxSellAmount)
if amount < 1 then
busy[src] = nil
return { ok = false, counts = itemCounts(src), message = 'You have nothing of that to sell.' }
end
local payout = entry.price * amount
if not exports.ox_inventory:RemoveItem(src, item, amount) then
busy[src] = nil
return { ok = false, counts = itemCounts(src), message = 'Could not take the items.' }
end
if not exports.qbx_core:AddMoney(src, Config.SellAccount, payout, 'hunting-sale') then
if not exports.ox_inventory:AddItem(src, item, amount) then
print(('[qbx_hunting] RECONCILE: %s lost %dx %s (payment and restore failed)'):format(cid, amount, item))
end
busy[src] = nil
return { ok = false, counts = itemCounts(src), message = 'Payment failed; items returned.' }
end
busy[src] = nil
return {
ok = true,
counts = itemCounts(src),
licenseRemaining = remaining,
message = ('Sold %dx %s for $%d.'):format(amount, entry.label, payout)
}
end)The client only names the item. The quantity is what the player really holds, the price is server config, the items are removed before the money is paid, and they are restored if the payment fails.
Frequently asked questions
Is Qbox code different from QBCore code?
Yes. Qbox has no core object to fetch, uses ox_lib callbacks and ox_inventory, and keys job grades by number where QBCore uses strings. A QBCore script can run on Qbox through the bridge, but native Qbox code does not depend on it.
What do I need on the server?
The resources a Qbox server already runs: qbx_core, ox_lib and ox_inventory, plus oxmysql when the script stores data. Each resource's README lists its dependencies.
Can I convert a QBCore script to Qbox instead?
Yes — the Framework Converter ports an existing QBCore or ESX resource to Qbox and keeps its behaviour.
Can I send the script straight to my server?
Pair your server once with the free Deploy to Server companion and send a script to it from its result card. The files land in the companion's folder; you move the resource into place and ensure it yourself.
How is it paid for?
With prepaid credits: a pack you buy once, or a monthly plan you can cancel any time. Every button shows its price first, planning a script costs nothing, and a failed generation is never charged.
Build your Qbox script
Open ScriptForge, pick Qbox and describe the resource.
Open ScriptForgeNot ready to start yet?
Leave your email. We only send updates if you tick the box below.