The framework bridge is the piece of TS-Lib that hides the differences between:
qb-core (qbcore)
qbx_core (qbox)
es_extended (esx)
- a minimal standalone mode
Instead of scattering if framework == 'qbcore' then ... elseif framework == 'esx' ... in your code, you call Bridge.Framework.* and let TS-Lib route to the right implementation.
Status & testing
How selection works
Supported values in ts-lib/config.lua:
- Framework keys:
qbcore, esx, qbox, standalone
- Mapped to resource names via
Config.Data.Framework:
When Config.Framework = 'auto', TS-Lib goes through this table and picks the first started resource.
Client-side API
Bridge.Framework.Client.PlayerData
Unified player data table populated automatically when the player loads and kept in sync on job changes.
- QBCore / Qbox: based on
QBCore.Functions.GetPlayerData()
- ESX: based on
xPlayer job data where possible
- Standalone: minimal stub (no job system)
Bridge.Framework.Client.Functions.GetPlayerJob()
Returns:
true, jobTable on success
false, errorMessage if no job is available (for example in standalone)
Bridge.Framework.Client.Functions.Notify(message, type?)
Generic notification helper:
- QBCore / Qbox:
QBCore.Functions.Notify
- ESX:
ESX.ShowNotification or a basic native fallback
- Standalone: simple native notification
Client events
All supported frameworks fire the same normalized events once the bridge is loaded:
ts-lib:client:onPlayerLoaded (playerData)
ts-lib:client:onPlayerUnloaded ()
ts-lib:client:onJobUpdated (job)
You can listen directly to these events, or use the internal event system:
Server-side API
Bridge.Framework.Server.Functions.GetPlayerJob(source)
Bridge.Framework.Server.Functions.GetPlayersByJobName(jobName, checkOnDuty?)
Bridge.Framework.Server.Functions.GetPlayers()
Returns a list of player sources, using the most appropriate method for each framework:
- QBCore:
QBCore.Functions.GetPlayers()
- Qbox:
exports.qbx_core:GetQBPlayers()
- ESX:
ESX.GetPlayers() (or GetPlayers() as a fallback)
- Standalone:
GetPlayers()
Bridge.Framework.Server.Functions.GetVehicleType(model)
When possible this uses framework-specific shared vehicle tables; otherwise it falls back to 'automobile'.
Server events
Normalized events fired regardless of the underlying framework:
ts-lib:server:onPlayerLoaded (source)
ts-lib:server:onPlayerUnloaded (source?)
ts-lib:server:onJobUpdated (job)
You can also subscribe through the server-side event emitter:
Framework-specific notes
QBCore / Qbox
- QBCore:
exports['qb-core']:GetCoreObject()
- Qbox:
exports['qbx_core']:GetCoreObject() and exports.qbx_core:GetQBPlayers()
Jobs are normalized into a structure similar to:
ESX
- Uses
exports['es_extended']:getSharedObject().
- Bridges try to map ESX job information onto the same keys used by QB-style frameworks.
Standalone
Standalone intentionally keeps a minimal surface:
- No job system (
GetPlayerJob returns an error).
GetPlayers() simply wraps the FiveM native.
GetVehicleType always returns 'automobile'.
Last modified on August 28, 2026