🦲 why.qbox?
- 🧔why.not?
this site only briefly summarizes the purpose of qbox, it is not the official page
- 🧔why.not?
this site only briefly summarizes the purpose of qbox, it is not the official page
+ yes, of course.
While originally forked from QBCore, many Qbox resources have been refactored to improve code quality, enhance security, lower performance overhead, and integrate with overextended resources.
+ yes, they do.
We have created a bridge layer for backward compatibility with documented and correct qb-core usage paths, and you can continue to use most QBCore scripts without any changes.
+ yes, it is.
Since qbx_core has backward compatibility with qb-core sources, we recommend using only published Qbox sources for a stable experience.
A short overview | QBCore | Qbox |
---|---|---|
lightweight | 🔧 | ✅ |
no lint errors are present | ⭕ | ✅ |
readable and well organized | 🔧 | ✅ |
modular structure | ⭕ | ✅ |
no deprecated functions are being invoked | ⭕ | ✅ |
-- qbx_core/server/storage/main.lua
local players = require 'server.storage.players'
---@class StorageFunctions
---@field insertBan fun(request: InsertBanRequest)
---@field fetchBan fun(request: GetBanRequest): BanEntity?
---@field deleteBan fun(request: GetBanRequest)
---@field upsertPlayerEntity fun(request: UpsertPlayerRequest)
---@field fetchPlayerSkin fun(citizenId: string): PlayerSkin?
---@field fetchPlayerEntity fun(citizenId: string): PlayerEntity?
---@field fetchAllPlayerEntities fun(license2: string, license?: string): PlayerEntity[]
---@field deletePlayer fun(citizenId: string): boolean success
---@field fetchIsUnique fun(type: UniqueIdType, value: string|number): boolean
---@field addPlayerToJob fun(citizenid: string, group: string, grade: integer)
---@field addPlayerToGang fun(citizenid: string, group: string, grade: integer)
---@field fetchPlayerGroups fun(citizenid: string): table<string, integer>, table<string, integer> jobs, gangs
---@field removePlayerFromJob fun(citizenid: string, group: string)
---@field removePlayerFromGang fun(citizenid: string, group: string)
---@type StorageFunctions
return players