qbox-framework
Qbox Framework Development
This skill provides guidelines and patterns for developing resources using the Qbox Project (qbx_core).
1. Philosophy: Exports & Modules
Qbox moves away from the global "Core Object" pattern (though supported via bridge) in favor of direct exports and imported modules.
Modern Native Way (Preferred):
local player = exports.qbx_core:GetPlayer(source)
Bridge Way (Legacy/Porting):
local QBCore = exports['qb-core']:GetCoreObject() -- Works via qbx_core bridge
2. Key Dependencies
Qbox is built "Ox-First". You will frequently use:
- ox_lib: For UI, callbacks, zones, and utilities.
- ox_inventory: For items and inventory management.
- oxmysql: For database interactions.
3. Player Management
- Get Player:
exports.qbx_core:GetPlayer(source) - Player Data: Unlike QBCore's lookup table, Qbox uses internal setters/getters exposed via exports.
- Save/Load: Handled automatically, but custom data can be saved via
GetPlayer(source).Functions.SetMetaData.
4. Resource Structure
my-resource/
├── fxmanifest.lua # Depends on qbx_core
├── client/
│ └── main.lua
├── server/
│ └── main.lua
└── locales/ # Ox_lib uses .json locales usually
└── en.json
5. Documentation
- Official Docs: https://docs.qbox.re/
- Github: https://github.com/Qbox-project/qbx_core
More from proelias7/fivem-skill
fivem-development
Develops resources for FiveM using vRP Creative Network with Lua. Covers resource creation, Proxy/Tunnel system, inventory, money, groups, identity, NUI, database (oxmysql), security, and performance. Use when the user works with FiveM, vRP, Lua scripts for GTA V servers, or mentions resources, client/server scripts, natives, NUI, or any system of the vRP Creative Network framework.
101esx-framework
Develops resources for FiveM using the ESX Framework (Legacy). Covers resource creation, Core Object (ESX), xPlayer functions, Events, Callbacks, Items, Jobs, Database (oxmysql), and best practices. Use when the user works with FiveM, ESX, ESX Legacy, or mentions `ESX.GetCoreObject`, `xPlayer`, `ESX.GetPlayerFromId`, or `esx:`.
53qbcore-framework
Develops resources for FiveM using the QBCore Framework. Covers resource creation, Core Object usage, Player management, Callbacks, Events, Items, Jobs, Gangs, Database (oxmysql), and best practices. Use when the user works with FiveM, QBCore, Lua scripts for QBCore servers, or mentions `QBCore.Functions`, `GetCoreObject`, `CitizenID`, or any system of the QBCore Framework.
35qbcore-development
Develops resources for FiveM using the QBCore Framework. Covers resource creation, Core Object usage, Player management, Callbacks, Events, Items, Jobs, Gangs, Database (oxmysql), and best practices. Use when the user works with FiveM, QBCore, Lua scripts for QBCore servers, or mentions `QBCore.Functions`, `GetCoreObject`, `CitizenID`, or any system of the QBCore Framework.
1