N Bridge

N Bridge

One function, whichever framework or inventory the server runs. Your resources call Bridge and stop branching on ESX, QB, Qbox, ox_core, vRP, and inventory scripts.

⚠️

Start the framework and the inventory before n_bridge. Start every NXBR resource after it.

Installation

Drop the resource in

        • fxmanifest.lua
        • config.lua
        • init.lua
  • Start order

    ensure oxmysql
    ensure qbx_core
    ensure ox_inventory
    ensure ox_lib
    ensure n_bridge

    Swap in es_extended, qb-core, or qb-inventory when that is what the server runs.

    Pick backends in config.lua

    auto uses the first started resource in core/catalog.lua. Set an id to force one.

    Config.Use = {
        framework = 'auto', -- esx | qb | qbox | ox | nd | vrp | standalone | custom
        inventory = 'auto',
        notify = 'auto',
        target = 'auto',
        progress = 'auto',
        appearance = 'auto',
        fuel = 'auto',
        keys = 'auto',
        phone = 'auto',
        dispatch = 'auto',
        society = 'auto',
        vehicles = 'auto',
        textui = 'auto',
        bossmenu = 'auto',
        status = 'auto',
        input = 'auto',
        menu = 'auto',
        doorlock = 'auto',
        housing = 'auto',
        skills = 'auto',
        weather = 'auto',
    }

    The comment on each line in config.lua lists the provider ids. auto never selects custom. Dedicated notify, progress, text UI, input, and menu resources are ahead of ox_lib, because most servers run ox_lib as well.

    PrintProviders prints the choice on start: framework=esx inventory=ox notify=ox_lib .... Set it to false to skip that line.

    Log writes logs/<capability>.log. false writes nothing. true logs every capability. A table such as { framework = true } logs only those. Zones, callbacks, health and armor, and the version check use zones, callbacks, vitals, and version. Config.Debug stays a console switch.

    Call it from another resource

    -- fxmanifest.lua
    shared_script '@n_bridge/init.lua'
    local cash = Bridge.GetPlayerMoney(source, 'cash')

    init.lua in any resource other than n_bridge is only a proxy to those exports.

    Readable files

    Keymaster escrow leaves these plain. Everything else under providers/ is locked:

    • fxmanifest.lua, config.lua, init.lua
    • core/** (routing only, no third-party calls)
    • providers/**/custom/**
    • docs/**

    What 0.9.0 ships

    Framework, inventory, notify, target, progress, appearance, fuel, keys, phone, dispatch, society, owned vehicles, text UI, boss menu, and status. Status covers hunger, thirst, and stress on a 0 to 100 scale, plus health and armor.

    0.9.0 adds input dialogs, context menus, door locks, housing, skills, and weather and time. Zones are built in and need no zone resource. CheckVersion compares a resource's manifest version with its latest GitHub release.

    Each export page lists one function per section: parameters, the return value, and a full example. A Client or Server page exists only when that side has a real call. Player calls include character info, boss and group checks, job and gang lists, and callbacks. Client calls include closest entities, vehicle spawn, and vehicle properties. Server appearance calls read the saved skin and outfit list.

    Client reads do not take a server id. That includes inventory, keys, gang, identifier, the local property, and skill level and XP. n_carlock and wasabi_carlock are separate providers. The full backend list is on the Shipped page.

    Join Our Discord