Skip to main content
TRACK B·FRAMEWORK INTEGRATION·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.
Qbox

Qbox: how the framework works

Qbox is a framework for FiveM roleplay servers. A framework is the engine underneath all of your roleplay scripts: it tracks who is logged in, their character, money, and job. Qbox is a modern fork of an older framework called QBCore, rebuilt on the ox resources (ox_lib and ox_inventory). This lesson shows you how the framework itself works, not inventory or other add-on scripts.

You'll learn
What Qbox is, why it is the modern ox-based fork of QBCore, how to read a player, move money and items, write commands and callbacks, and ship a small /drinkwater script.
Time
~20 minutes to read, longer if you build the example.
You need
A running FiveM server with qbx_core, ox_lib and ox_inventory installed (the Qbox recipe sets all three up for you).
Result
You can write your own Qbox server and client code using direct exports and the ox modules, the way modern Qbox scripts do it.
BEFORE YOU START

What is Qbox?

Qbox is a framework for FiveM (GTA V roleplay servers). Think of it as the "engine" or "foundation" underneath all of your roleplay scripts.

The core resource is called qbx_core. It handles things like:

  • Players who is logged in, their character, money, job, gang.
  • Jobs and gangs police, mechanic, mafia, and so on.
  • Money cash, bank, and dirty money (crypto).
  • Commands the things you type in chat like /job or /car.
  • Metadata extra data about a player such as hunger, thirst, stress.

Other scripts (an inventory, a gas-station job, a car dealership) build on top of Qbox and ask qbx_core for help: "Who is this player? How much money do they have? Take 500 from the bank."

Important: The core resource is qbx_core. Everything else (ox_inventory, a job script, and so on) is a separate resource that depends on qbx_core.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • Key concepts (read this first)
  • How you reach the framework
  • PlayerData: everything about a player
  • Server functions
  • Client functions
  • Commands: make your own
  • Callbacks: secure communication
  • Jobs: where they live
  • A complete mini example
  • Common mistakes and pitfalls

The remainder of Qbox: how the framework works is available to FiveM School members.