GenZeeDocs

Universal Bridge

The shared layer every Universal product ships with.

universal_bridge is a small resource that comes with every Universal product. It has no dependencies of its own and ships unencrypted, because it's the part other scripts talk to. You only ever need one copy, even if you own several products.

It does three jobs.

1. It makes ox scripts render through the suite

With ox_lib or ox_target installed and the bridge ensured after them, the bridge answers their exports itself. Every lib.notify, lib.registerContext, lib.progressBar, exports.ox_target:* call and the ox_lib radial API lands in Universal UI or Universal Targeting instead. ox's own third-eye and radial are switched off through their official disable exports, so nothing draws twice.

ox's files are never modified. Stop the bridge and restart ox_lib, and ox's own UI comes straight back.

Your scripts callHandled by
ox_lib notifications, context menus, dialogs, progress, skill checks, text UI, list menusUniversal UI
exports.qbx_core:Notify on the serverUniversal UI
exports.ox_target:* and legacy qtarget exportsUniversal Targeting
ox_lib radial (lib.addRadialItem and friends)Universal Targeting

Each redirect only switches on when the product that handles it is running. Later products add more redirects the same way, such as ox_inventory, illenium-appearance and the common HUD events.

2. It gives the suite one look

When more than one Universal product runs, the bridge merges their themes, so a colour you pick in Universal UI's theme editor also reaches Universal Targeting. To keep each product's theme separate, add this to server.cfg:

setr universal:mergedTheme 0

3. It connects the products to each other

Products find each other through the bridge, with nothing to configure. Universal Targeting's settings, for example, appear as a page in Universal Pause's settings once both run.

Commands

CommandWhereWhat it does
universal_bridge statusServer console, or in game with the universal_bridge.manage aceLists which ox resources and Universal products are running, whether each redirect is active, and any script that bypasses the redirect.
/universal_bridge:testIn game, with setr universal_ui:dev 1Makes real lib.* calls. If they render as Universal UI, the redirect is working.

To use the status command in game:

add_ace group.admin universal_bridge.manage allow

The one thing it can't redirect

A server script that fires TriggerClientEvent('ox_lib:notify', ...) sends that event straight to ox_lib, so that one notification renders in ox's style. This is a FiveM platform limit. universal_bridge status names every script doing it. Switch those calls to Universal UI's server export, which takes the same payload:

-- before
TriggerClientEvent('ox_lib:notify', source, { title = 'Paid', type = 'success' })

-- after
exports.universal_ui:notify(source, { title = 'Paid', type = 'success' })

On this page