Frameworks

Supported frameworks and how to customize a bridge.

The script talks to your framework through one bridge file per framework in modules/creator/bridge/. With Framework = 'auto' the bridge of the framework that is running is loaded, and the others stay inactive.

The bridge files are not escrowed, so you can point them at your own economy, key script or database layout.

Supported Frameworks

QboxQBCoreESXox_core
Config valueqboxqbcoreesxoxcore
Required resourcesqbx_core, qbx_vehiclesqb-corees_extendedox_core
Vehicle tableplayer_vehiclesplayer_vehiclesowned_vehiclesvehicles
Vehicle keysqbx_vehiclekeysqb-vehiclekeysAdd your ownBuilt into ox_core
Impound fee paid fromBank, then cashBank, then cashBank, then cashmoney item (ox_inventory)
Storage suggestionsqbx_garagesQBCore.Shared.GaragesFree textFree text
On duty checkYesYesAlways on dutyAlways on duty

ESX: the script adds a parking column to owned_vehicles on the first start, and reads the vehicles table to turn the model hash back into a spawn name. A car whose model is missing from the vehicles table can't be spawned and stays hidden; the console tells you which plate it is.

ox_core: groups are used as jobs. A player's job is the group with the highest grade.

Customizing a Bridge

Open the bridge file of your framework, e.g. modules/creator/bridge/qbox.lua, and change the function you need. Two common examples:

ESX has no key system of its own, so GiveKeys is empty. Add the call of your lock resource:

modules/creator/bridge/esx.lua
function Bridge.GiveKeys(playerId, entity)
    local plate = GetVehicleNumberPlateText(entity)
    -- example, use the export or event of your own key script
    exports.my_vehiclekeys:GiveKey(playerId, plate)
end

Never spawn, move or delete vehicles from a bridge. Only GetVehicle, GetVehicles and the database updates may yield; every other function has to return straight away.

Custom framework? Pick the bridge that is closest to yours, set Framework to that name in config.lua, and rewrite its functions. Remove the AssertReady checks for resources you don't run.

Bridge Reference

Every bridge fills the global EvolentGarageBridge table with the functions below.

---@class BridgePlayer
---@field identifier string|number               -- citizenid, ESX identifier or ox charId
---@field job { name: string, grade: number, onDuty: boolean }

---@class BridgeVehicle
---@field id number|string                       -- vehicle row id (the plate on ESX)
---@field citizenid string|number                -- owner identifier
---@field modelName string                       -- spawn name, e.g. 'sultan'
---@field state 0|1                              -- 0 = out, 1 = stored
---@field garage string|nil                      -- storage name the vehicle is kept in
---@field props table                            -- ox_lib vehicle properties (plate, mods, fuelLevel, ...)

On this page