Frameworks & scripts

Framework bridge

Also called compatibility layer, bridge resource

A layer that lets a script written for one framework run on another, by translating exports, events and player objects between APIs.

A framework bridge is code that translates between framework APIs so a resource written for one framework can run on another. The two common shapes are a standalone bridge resource that exposes a fake ESX or QBCore object backed by a different core, and a built-in bridge inside a script that detects which framework is running and calls the right functions.

Qbox is the best-known example of the first shape: it ships compatibility so many scripts written for QBCore keep working. Many paid scripts use the second shape, with a small bridge folder holding one file per supported framework.

Bridges solve a real problem but they are an abstraction, and abstractions leak. Common issues:

  • Data shape mismatches. ESX and QBCore represent jobs, money and items differently. A bridge maps the common cases and fails on the edges.
  • Events that do not exist. Scripts listening for a framework-specific event will never receive it if the bridge does not emit it.
  • Inventory. If the server uses ox_inventory instead of the framework's own inventory, the bridge must route item calls there too.

Treat a bridge as a migration tool, not a permanent design. Test every bridged script for money, items and job changes on a staging server, and prefer native versions when the author offers them.

Bridges are also a frequent source of server economy bugs, because a mistranslated money call can create or destroy cash silently. Log transfers during the first weeks after a migration.

Related terms

Trying to get your server seen?

The live leaderboard shows what the numbers look like at the top of the list, and the upvote calculator turns a target server into a campaign size. The full glossary is here.