The framework bridge is the piece of TS-Lib that hides the differences between:Documentation Index
Fetch the complete documentation index at: https://docs.toine.me/llms.txt
Use this file to discover all available pages before exploring further.
qb-core(qbcore)qbx_core(qbox)es_extended(esx)- a minimal standalone mode
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
| Framework | Status | Tested by |
|---|---|---|
qbcore | Tested | Toine |
esx | Tested | Toine |
qbox | Experimental | waiting for feedback |
standalone | Tested | Toine |
How selection works
Supported values ints-lib/config.lua:
- Framework keys:
qbcore,esx,qbox,standalone - Mapped to resource names via
Config.Data.Framework:
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
xPlayerjob data where possible - Standalone: minimal stub (no job system)
Bridge.Framework.Client.Functions.GetPlayerJob()
true, jobTableon successfalse, errorMessageif 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.ShowNotificationor 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)
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()(orGetPlayers()as a fallback) - Standalone:
GetPlayers()
Bridge.Framework.Server.Functions.GetVehicleType(model)
'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)
Framework-specific notes
QBCore / Qbox
- QBCore:
exports['qb-core']:GetCoreObject() - Qbox:
exports['qbx_core']:GetCoreObject()andexports.qbx_core:GetQBPlayers()
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 (
GetPlayerJobreturns an error). GetPlayers()simply wraps the FiveM native.GetVehicleTypealways returns'automobile'.