Official BrunxScripts resource Qbox • QBCore • ESX • OX • vRP • Standalone
Fast to integrate • Easy to scale • Clean API

One bridge for modern FiveM resources.

Brunx Bridge is a future-proof compatibility layer that normalizes framework logic, job checks, money helpers, inventory usage, target zones, UI helpers, callbacks and elevators across your resources.

AutoFramework detection
OXUnified UI layer
Targetox/qb/drawtext fallback
ElevatorsGlobal and map based
Typical usage
-- Server-side usage
local Bridge = exports['brnx_bridge']:GetBridge()

RegisterCommand('bridgejob', function(source)
    local job = Bridge.GetJob(source)
    print(json.encode(job))
end, false)

-- Client-side usage
local Bridge = exports['brnx_bridge']:GetBridge()
Bridge.Notify({
    title = 'Bridge',
    description = 'Client bridge loaded.',
    type = 'success'
})

Overview

Instead of writing separate code for every framework, inventory, target and UI system, your scripts can call Brunx Bridge once and let the bridge normalize the differences.

Framework abstraction

Detects Qbox, QBCore, ESX, OX, vRP or standalone mode and exposes normalized player, identifier, name, job, grade, duty and money helpers.

Inventory helpers

Provides simple server-side item helpers with ox_inventory support and player function fallback for compatible frameworks.

Target fallback

Uses ox_target when available, qb-target when available, and a drawtext interaction fallback when no target resource is running.

UI layer

Uses ox_lib for notifications, progress bars, context menus and text UI, keeping UI usage consistent across resources.

Callbacks

Wraps ox_lib callback registration and client triggering so scripts can use one consistent pattern.

Elevators

Includes a configurable elevator system with global elevators, map-specific elevators, job locks, boss locks, progress bars and carry support.

Installation

Install the bridge before any resource that depends on it. The simplest setup is: download, rename, ensure, configure and restart.

1. Download

Download the latest main branch archive and extract it into your FiveM resources folder.

2. Rename folder

Rename the extracted folder to brnx_bridge if needed, so the resource name matches your exports and dependencies.

3. Ensure in the correct order

Ensure ox_lib, oxmysql and then brnx_bridge before dependent resources.

4. Configure

Edit shared/config.lua and keep most values on auto unless you intentionally want to force a specific setup.

ensure ox_lib
ensure oxmysql
ensure brnx_bridge

# your resource that depends on the bridge
ensure my_resource
The resource uses ox_lib as the primary UI layer. Keep ox_lib installed and started for notifications, progress bars, context menus, text UI and callbacks.

Quick Start

The recommended pattern is to fetch the bridge object once and use the normalized helper functions from that object.

-- server.lua
local Bridge = exports['brnx_bridge']:GetBridge()

RegisterCommand('checkjob', function(source)
    local job = Bridge.GetJob(source)
    Bridge.Notify(source, {
        title = 'Current Job',
        description = ('You are working as %s'):format(job.label or job.name or 'Unknown'),
        type = 'inform'
    })
end, false)
-- client.lua
local Bridge = exports['brnx_bridge']:GetBridge()

CreateThread(function()
    Wait(1000)
    Bridge.Notify({
        title = 'Bridge Ready',
        description = 'Client bridge initialized successfully.',
        type = 'success'
    })
end)

Configuration

Edit shared/config.lua. Use auto unless you want to force a specific framework, inventory or target system.

Config.Debug = false
Config.Locale = 'nl'

-- auto, qbox, qbcore, esx, ox, vrp, standalone
Config.Framework = 'auto'

-- auto, ox_inventory, qb-inventory, lj-inventory, ps-inventory,
-- qs-inventory, origen_inventory, codem-inventory, core_inventory,
-- mf-inventory, esx_inventory, standalone
Config.Inventory = 'auto'

-- auto, ox_target, qb-target, drawtext
Config.Target = 'auto'

Config.NotifySystem = 'ox_lib'
Config.Menu = 'ox_lib'
Config.Input = 'ox_lib'
Config.Progress = 'ox_lib'
Config.TextUI = 'ox_lib'
OptionDescriptionTypical value
Config.DebugPrints bridge debug information when enabled.false
Config.LocaleDefault locale file used by the bridge.nl or en
Config.FrameworkFramework mode. Auto-detection supports Qbox, QBCore, ESX, OX, vRP and standalone.auto
Config.InventoryInventory mode. Auto-detection can be used, or you can force your inventory type.auto
Config.TargetTarget mode. Falls back to drawtext if ox_target or qb-target is not available.auto
Config.ResourceNamesResource name aliases used during auto-detection.Keep defaults unless your resources use custom names.
Config.CustomGetPlayerJobOptional server hook to return a custom normalized job object.function(source) return nil end

Exports & Bridge API

The recommended pattern is to get the bridge object once and call functions from that object. Direct exports stay small; the Bridge object contains the real module helpers.

Server direct exports

exports['brnx_bridge']:GetBridge()
exports['brnx_bridge']:GetFramework()
exports['brnx_bridge']:GetPlayer(source)
exports['brnx_bridge']:GetIdentifier(source)
exports['brnx_bridge']:GetJob(source)
exports['brnx_bridge']:GetJobName(source)
exports['brnx_bridge']:HasJob(source, jobs)
exports['brnx_bridge']:Notify(source, data)

Client direct exports

exports['brnx_bridge']:GetBridge()
exports['brnx_bridge']:GetFramework()
exports['brnx_bridge']:Notify(data)
exports['brnx_bridge']:GetPlayerData()
exports['brnx_bridge']:GetJob()
exports['brnx_bridge']:GetJobName()
exports['brnx_bridge']:HasJob(jobs)

Server Bridge object

FunctionReturnsDescription
Bridge.GetFramework()stringReturns the detected framework name.
Bridge.GetPlayer(source)table | nilReturns the framework player object or standalone fallback.
Bridge.GetIdentifier(source)string | nilReturns citizenid, license, identifier or a license fallback.
Bridge.GetName(source)stringReturns character name when available, otherwise player name.
Bridge.GetJob(source)tableReturns a normalized job object with name, label, grade, gradeLabel, isBoss, type and duty.
Bridge.GetJobName(source)string | nilReturns the normalized job name only.
Bridge.GetGrade(source)numberReturns the normalized job grade.
Bridge.IsOnDuty(source)booleanReturns false only when duty is explicitly false.
Bridge.HasJob(source, jobs)booleanChecks string, array or rule table job access.
Bridge.GetPlayers()tableReturns online player sources.
Bridge.GetPlayersByJob(jobs)tableReturns online players matching the provided job rule.
Bridge.GetMoney(source, account)numberReads player money from cash, bank or another supported account.
Bridge.AddMoney(source, account, amount, reason)booleanAdds player money through the active framework.
Bridge.RemoveMoney(source, account, amount, reason)booleanRemoves player money through the active framework.
Bridge.Notify(source, data)nilSends a bridge notification to one client.
Bridge.RegisterCallback(name, cb)booleanRegisters an ox_lib server callback.
Bridge.AddItem(source, item, amount, metadata, slot)booleanAdds an item using ox_inventory or a framework fallback.
Bridge.RemoveItem(source, item, amount, slot, metadata)booleanRemoves an item using ox_inventory or a framework fallback.
Bridge.HasItem(source, item, amount)booleanChecks if a player has at least the requested amount.
Bridge.Society.GetMoney(account)numberReads a society account balance from supported banking resources.
Bridge.Society.AddMoney(account, amount)booleanAdds money to a society account.
Bridge.Society.RemoveMoney(account, amount)booleanRemoves money from a society account.

Client Bridge object

FunctionReturnsDescription
Bridge.GetFramework()stringReturns the detected client framework.
Bridge.GetPlayerData()tableReturns framework player data when available.
Bridge.GetJob()tableReturns the normalized client job object.
Bridge.GetJobName()string | nilReturns the normalized job name only.
Bridge.GetGrade()numberReturns the normalized job grade.
Bridge.IsOnDuty()booleanReturns the duty state from normalized job data.
Bridge.HasJob(jobs)booleanChecks the current player job against a string, array or table.
Bridge.Notify(data)nilShows an ox_lib notification or a GTA feed fallback.
Bridge.TriggerCallback(name, cb, ...)nilTriggers an ox_lib callback from the client.
Bridge.ShowTextUI(text, options)booleanShows an ox_lib text UI element.
Bridge.HideTextUI()booleanHides the current ox_lib text UI element.
Bridge.Progress(data)booleanRuns an ox_lib progress bar.
Bridge.ContextMenu(data)booleanRegisters and opens an ox_lib context menu.
Bridge.Target.AddBoxZone(id, data)booleanAdds a box zone through ox_target, qb-target or the drawtext fallback.

Examples

Below are practical examples you can copy directly into your own resources and adapt as needed.

-- Server: simple job lock
local Bridge = exports['brnx_bridge']:GetBridge()

RegisterCommand('armory', function(source)
    if not Bridge.HasJob(source, { police = true, sheriff = true }) then
        return Bridge.Notify(source, {
            title = 'Access denied',
            description = 'You are not allowed to use the armory.',
            type = 'error'
        })
    end

    Bridge.Notify(source, {
        title = 'Access granted',
        description = 'Welcome to the armory.',
        type = 'success'
    })
end, false)
-- Server: items and money
local Bridge = exports['brnx_bridge']:GetBridge()

RegisterNetEvent('example:rewardPlayer', function()
    local src = source

    Bridge.AddItem(src, 'water', 2)
    Bridge.AddMoney(src, 'bank', 500, 'Mission reward')

    Bridge.Notify(src, {
        title = 'Reward received',
        description = 'You received water and $500 in your bank account.',
        type = 'success'
    })
end)
-- Client: target zone with fallback
local Bridge = exports['brnx_bridge']:GetBridge()

CreateThread(function()
    Bridge.Target.AddBoxZone('example_zone', {
        coords = vec3(441.2, -981.9, 30.7),
        size = vec3(1.6, 1.6, 2.0),
        rotation = 0.0,
        debug = false,
        options = {
            {
                name = 'example_interaction',
                label = 'Open Example Menu',
                icon = 'fa-solid fa-door-open',
                onSelect = function()
                    Bridge.Notify({
                        title = 'Interaction',
                        description = 'The bridge target fallback is working.',
                        type = 'inform'
                    })
                end
            }
        }
    })
end)
-- Client: progress bar
local Bridge = exports['brnx_bridge']:GetBridge()

RegisterCommand('bridgeprogress', function()
    local success = Bridge.Progress({
        duration = 5000,
        label = 'Processing request...',
        canCancel = true,
        disable = {
            car = true,
            move = true,
            combat = true
        }
    })

    if success then
        Bridge.Notify({ title = 'Done', description = 'Action completed.', type = 'success' })
    else
        Bridge.Notify({ title = 'Cancelled', description = 'Action cancelled.', type = 'error' })
    end
end, false)

Elevator system

Brunx Bridge ships with a configurable elevator system. You can use global elevators, map-specific elevators and advanced job access rules including boss-only or duty-only floors.

Config.Elevators = {
    enabled = true,
    useProgressBar = true,
    progressDuration = 5000,
    allowCarry = true,
    defaultIcon = 'fa-solid fa-elevator',
    global = {
        {
            id = 'mission_row_pd',
            label = 'Mission Row Police Department',
            floors = {
                {
                    label = 'Lobby',
                    coords = vec4(441.15, -981.92, 30.69, 90.0)
                },
                {
                    label = 'Roof',
                    coords = vec4(448.87, -981.21, 43.69, 180.0),
                    jobLock = {
                        jobs = {
                            police = true,
                            sheriff = { minGrade = 2 },
                            fib = { bossOnly = true }
                        }
                    }
                }
            }
        }
    }
}

jobLock.jobs

Use job names as keys. The value can be true, a minimum grade number, or a table with minGrade, bossOnly and dutyOnly.

jobLock.jobTypes

Use normalized job types such as leo or ems when your framework exposes a job type.

hideIfNoAccess

When true, unauthorized floors can be hidden from the menu instead of being shown as locked.

If you use escorted, carried or cuffed mechanics, enable carry support so elevator transitions remain smooth when moving multiple connected players.

Events

Most integrations will rely on exports and the bridge object, but these events can still be useful for reactive setups.

EventSideDescription
Bridge:RefreshServerTriggered when a registered bridge module is refreshed. Useful if another resource wants to respond to bridge module changes.
brnx_bridge:client:notifyClientDisplays a bridge-based notification on the client.
brnx_bridge:elevators:openClientOpens the elevator menu for a nearby configured elevator when available.