Supported QB-Core Functions
The bridge provides comprehensive compatibility with QB-Core’s API. Below is a detailed breakdown of what’s supported.
Server-Side Compatibility
Player Functions
All standard QB-Core player functions are supported:
-- Getting players
QBCore . Functions . GetPlayer ( source )
QBCore . Functions . GetPlayerByCitizenId ( citizenid )
QBCore . Functions . GetOfflinePlayerByCitizenId ( citizenid )
QBCore . Functions . GetPlayerByPhone ( number )
QBCore . Functions . GetPlayers () -- returns source IDs
QBCore . Functions . GetQBPlayers () -- returns player objects
-- Player management
QBCore . Player . Login ( source , citizenid , newData )
QBCore . Player . Logout ( source )
QBCore . Player . CreatePlayer ( playerData , Offline )
QBCore . Player . Save ( source )
QBCore . Player . DeleteCharacter ( citizenid )
QBCore . Player . GenerateUniqueIdentifier ( type )
Not Supported : player.Functions.AddField(), player.Functions.AddMethod(), player.Functions.GetCardSlot()These are incompatible with Qbox’s architecture. Use native Qbox methods instead.
-- Items
QBCore . Functions . CreateUseableItem ( item , callback )
QBCore . Functions . CanUseItem ( item )
QBCore . Functions . HasItem ( source , items , amount ) -- deprecated
-- Vehicles
QBCore . Functions . SpawnVehicle ( source , model , coords , warp )
QBCore . Functions . GetCoords ( entity )
QBCore . Functions . GetPlate ( vehicle )
-- Utility
QBCore . Functions . Kick ( source , reason , setKickReason , deferrals )
QBCore . Functions . IsLicenseInUse ( license )
QBCore . Functions . GetIdentifier ( source , idType )
QBCore . Functions . Notify ( source , text , type , duration , ... )
-- Jobs
QBCore . Functions . AddJob ( jobName , job ) -- deprecated, use CreateJobs
QBCore . Functions . AddJobs ( jobs ) -- deprecated, use CreateJobs
QBCore . Functions . UpdateJob ( jobName , job )
QBCore . Functions . RemoveJob ( jobName )
QBCore . Functions . GetDutyCount ( job )
QBCore . Functions . GetPlayersOnDuty ( job )
-- Gangs
QBCore . Functions . AddGang ( gangName , gang ) -- deprecated, use CreateGangs
QBCore . Functions . AddGangs ( gangs ) -- deprecated, use CreateGangs
QBCore . Functions . UpdateGang ( gangName , gang )
QBCore . Functions . RemoveGang ( gangName )
-- Access
QBCore . Shared . Jobs -- auto-synced
QBCore . Shared . Gangs -- auto-synced
QBCore . Functions . HasPermission ( source , permission )
QBCore . Functions . GetPermission ( source )
QBCore . Functions . AddPermission ( source , permission )
QBCore . Functions . RemovePermission ( source , permission )
QBCore . Functions . IsWhitelisted ( source )
QBCore . Functions . IsPlayerBanned ( source )
QBCore . Functions . IsOptin ( source )
QBCore . Functions . ToggleOptin ( source )
QBCore . Functions . SetPlayerBucket ( source , bucket )
QBCore . Functions . SetEntityBucket ( entity , bucket )
QBCore . Functions . GetPlayersInBucket ( bucket )
QBCore . Functions . GetEntitiesInBucket ( bucket )
QBCore . Functions . GetBucketObjects ()
Callbacks
QB-Core callbacks are deprecated but still functional. Migrate to ox_lib callbacks for better performance.
-- Server callbacks (deprecated but working)
QBCore . Functions . CreateCallback ( name , cb )
QBCore . Functions . TriggerCallback ( name , source , cb , ... )
-- Client callbacks (deprecated but working)
QBCore . Functions . TriggerClientCallback ( name , source , cb , ... )
-- Modern alternative (recommended)
lib . callback . register ( 'callbackName' , function ( source , ...)
return data
end )
Commands
-- QB-Core style (works via bridge)
QBCore . Commands . Add ( name , help , arguments , argsRequired , callback , permission )
-- Translates to ox_lib internally
lib . addCommand ( name , properties , callback )
Client-Side Compatibility
Player Data
-- Get player data (deprecated but works)
local PlayerData = QBCore . Functions . GetPlayerData ()
-- Modern alternative
local PlayerData = require 'qbx_core:playerdata' -- module import
-- or
local PlayerData = QBX . PlayerData
UI Functions
-- Works via bridge
QBCore . Functions . Notify ( text , type , duration , subTitle , position , style , icon , iconColor )
-- Translates to ox_lib notify
lib . notify ({
title = text ,
type = type ,
duration = duration ,
-- ...
})
-- Bridge functions (deprecated)
exports [ 'qb-core' ]: DrawText ( text , position )
exports [ 'qb-core' ]: ChangeText ( text , position )
exports [ 'qb-core' ]: HideText ()
-- Events (deprecated)
TriggerEvent ( 'qb-core:client:DrawText' , text , position )
TriggerEvent ( 'qb-core:client:HideText' )
-- Modern alternative
lib . showTextUI ( text , { position = position })
lib . hideTextUI ()
Position mapping:
left → left-center
right → right-center
top → top-center
-- QB-Core style (works)
QBCore . Functions . Progressbar ( name , label , duration , useWhileDead , canCancel ,
disableControls , animation , prop , propTwo , onFinish , onCancel )
-- Translates to ox_lib
lib . progressBar ({
duration = duration ,
label = label ,
useWhileDead = useWhileDead ,
canCancel = canCancel ,
disable = disableControls ,
anim = animation ,
prop = prop
})
Vehicle Functions
-- Spawn vehicle (deprecated but works)
QBCore . Functions . SpawnVehicle ( model , cb , coords , isNetworked , teleportInto )
-- Get/Set properties (works with ox_lib translation)
local props = QBCore . Functions . GetVehicleProperties ( vehicle )
QBCore . Functions . SetVehicleProperties ( vehicle , props )
-- Utility
QBCore . Functions . GetPlate ( vehicle )
QBCore . Functions . GetVehicleLabel ( vehicle )
QBCore . Functions . DeleteVehicle ( vehicle )
QBCore . Functions . SpawnClear ( coords , radius )
Vehicle properties are automatically translated between QB-Core and ox_lib formats. Additional QB-specific properties like tireHealth, tireBurstState, etc. are preserved.
World Functions
-- Entity getters (deprecated)
QBCore . Functions . GetVehicles ()
QBCore . Functions . GetObjects ()
QBCore . Functions . GetPlayers ()
QBCore . Functions . GetPeds ( ignoreList )
-- Closest entity (deprecated)
QBCore . Functions . GetClosestVehicle ( coords )
QBCore . Functions . GetClosestObject ( coords )
QBCore . Functions . GetClosestPlayer ( coords )
QBCore . Functions . GetClosestPed ( coords , ignoreList )
QBCore . Functions . GetClosestBone ( entity , list )
-- Modern alternatives from ox_lib
lib . getClosestVehicle ( coords , maxDistance , includePlayerVehicle )
lib . getClosestPlayer ( coords , maxDistance , includePlayerPed )
lib . getClosestPed ( coords , maxDistance , ... )
Shared Compatibility
Items
-- Automatically populated from ox_inventory
QBCore . Shared . Items [ 'phone' ] = {
name = 'phone' ,
label = 'Phone' ,
weight = 100 ,
type = 'item' ,
unique = false ,
useable = true ,
-- ...
}
Items are automatically converted from ox_inventory’s data/items.lua at startup. Weapons, components, and ammo are also included.
Utility Functions
-- String/Math utilities (deprecated but working)
QBCore . Shared . CommaValue ( value ) -- use lib.math.groupdigits
QBCore . Shared . RandomStr ( length ) -- use lib.string.random
QBCore . Shared . RandomInt ( length ) -- use lib.string.random
QBCore . Shared . SplitStr ( str , delimiter ) -- use string.strsplit
QBCore . Shared . Trim ( str ) -- use qbx.string.trim
QBCore . Shared . FirstToUpper ( str ) -- use qbx.string.capitalize
QBCore . Shared . Round ( value , numDecimalPlaces ) -- use qbx.math.round
-- Vehicle utilities (deprecated)
QBCore . Shared . ChangeVehicleExtra ( vehicle , extras ) -- use qbx.setVehicleExtras
QBCore . Shared . SetDefaultVehicleExtras ( vehicle , extras ) -- use qbx.setVehicleExtras
-- Clothing
QBCore . Shared . MaleNoGloves -- use qbx.armsWithoutGloves.male
QBCore . Shared . FemaleNoGloves -- use qbx.armsWithoutGloves.female
Known Incompatibilities
The following QB-Core features are NOT supported and will error:
Inventory
qb-inventory - Must use ox_inventory
QBCore.Functions.UseItem() - Use ox_inventory’s UseItem export
QBCore.Player.SaveInventory() - ox_inventory auto-saves
QBCore.Player.GetTotalWeight() - Use ox_inventory exports
QBCore.Player.GetSlotsByItem() - Use ox_inventory exports
Items
QBCore.Functions.AddItem() - Incompatible, update ox_inventory config
QBCore.Functions.UpdateItem() - Incompatible, update ox_inventory config
QBCore.Functions.RemoveItem() - Incompatible, update ox_inventory config
To add/modify items, edit ox_inventory/data/items.lua directly. The bridge will auto-convert them.
Player Methods
player.Functions.AddField() - Use player.Functions.SetMetaData() instead
player.Functions.AddMethod() - Not supported
player.Functions.GetCardSlot() - Use ox_inventory directly
Migration Recommendations
While the bridge ensures your QB resources work, we recommend gradually migrating to native Qbox APIs:
Replace Callbacks
Migrate from QB-Core callbacks to ox_lib callbacks for better performance and maintainability. -- Old
QBCore . Functions . CreateCallback ( 'getName' , function ( source , cb )
cb ( 'John' )
end )
-- New
lib . callback . register ( 'getName' , function ( source )
return 'John'
end )
Use ox_lib Utilities
Replace deprecated utility functions with ox_lib equivalents. -- Old
local model = QBCore . Functions . LoadModel ( modelHash )
-- New
local model = lib . requestModel ( modelHash )
Direct ox_inventory Integration
Use ox_inventory exports directly instead of QB-Core wrappers. -- Old
local hasItem = QBCore . Functions . HasItem ( source , 'phone' )
-- New
local count = exports . ox_inventory : Search ( source , 'count' , 'phone' )
local hasItem = count > 0
Modern Player Data Access
Import the playerdata module instead of using GetPlayerData(). -- Old
local PlayerData = QBCore . Functions . GetPlayerData ()
-- New
local PlayerData = require 'qbx_core:playerdata'
Testing Your Resource
To verify compatibility:
Enable bridge : Ensure qbx:enablebridge convar is true
Check console : Look for deprecation warnings
Test functionality : Verify all features work as expected
Review errors : Any bridge-related errors will reference the incompatible function
Configuration Options
# server.cfg
# Enable/disable bridge (default: true)
setvars qbx:enablebridge "true"
# Allow method overrides in player object (default: true)
setvars qbx:allowmethodoverrides "true"
# Disable override warnings (default: false)
setvars qbx:disableoverridewarning "false"
# Discord link for kick messages
setvars qbx:discordlink "discord.gg/qbox"
Getting Help
If you encounter compatibility issues:
Qbox Discord Get support from the community
GitHub Issues Report bugs or compatibility problems
Summary
Fully Compatible : Most QB-Core resources run without modification
Automatic Translation : Bridge handles API differences transparently
Inventory Exception : Must use ox_inventory, not qb-inventory
Gradual Migration : Bridge allows you to migrate at your own pace while maintaining compatibility