awoken_bridge. Nothing here decides whether something may happen, only who carries it out.
Check the contract first
api is the contract and only changes when an existing function changes shape or disappears. resource is the build number, which is what belongs in the error: “needs api 2, found 1” is only actionable once you know which bridge is installed.
Backends() returns what was actually picked for each job, which is worth printing at boot in any script that genuinely cannot work without, say, an inventory.
Backends() reports the client-side jobs: interaction, keys, fuel and so on.
Server
Players and jobs
CountPolice and PoliceSources only count officers who are on duty. An off-duty officer does not make a robbery startable, and does not receive the call for it.GetGang and GetGangs return nothing on ESX, which has no gangs. Ask unconditionally and treat nil as “not in one”.
Money
Accounts are named in your words,
cash, bank and black_money, and translated inside each backend. ESX calls cash money and keeps the other two as accounts; qb keeps all three in one table. Neither spelling leaks out.RemoveMoney refuses rather than taking an account negative, so check its return instead of calling HasMoney first.
Needs and stress
GetNeeds returns nil where the framework has no such idea. That is a different answer from 0, which means starving.
Inventory
ItemSlots returns an empty table on an inventory with no idea of metadata, so it can be asked unconditionally.
Stashes and shops
OnStashChange drops its hook when the resource that asked for it stops, so restarting your script does not leave a dead callback firing.
Dispatch and evidence
DropObservation is only backed by Awoken Evidence. Other evidence systems ignore it, and SupportsObservations() tells you which you are on.
Phone and vehicles
Society and tax
Skills and XP
Activity, locks and cooldowns
Logs
Client
OpenBossMenu opens qbx_management on QBox. On a framework the bridge has no boss menu for it returns false, so a script can fall back to its own.Events
Each backend normalises its framework’s own lifecycle events into these, so you listen once rather than carrying three spellings.moneyChanged carries no amount. The frameworks disagree about what they hand over, and a balance worth showing has to be read back from the server anyway, so it only says to go and look again.Behaviour worth knowing
Activity is two calls, not one
Activity is two calls, not one
Ask before letting somebody start, claim once they have. Claiming during the check leaks a slot on every later refusal.The category is a free string, so a boosting script passes
'boosting' and needs nothing added to the bridge. The ceiling is off by default, so installing the bridge does not quietly change how much crime your server allows.Activities expire after Config.Activity.timeout minutes, and a script stopping returns its slots, so one that errors before finishing does not hold a slot until the next restart.The global cooldown is a no-op until the server owner lists you
The global cooldown is a no-op until the server owner lists you
Call
StartGlobalCooldown() and GlobalCooldownLeft() unconditionally. Both do nothing for a resource that is not listed in Config.GlobalCooldown.resources, so the server owner decides whether they mean anything. The resource name is taken from the caller, so a script cannot start or dodge somebody else’s timer.SkillLevel returns 0 with no skill resource
SkillLevel returns 0 with no skill resource
Treat a minimum of 0 as “no gate” rather than comparing blindly, or a server without one refuses everybody over experience they have no way to earn.
Logs fill in the calling resource themselves
Logs fill in the calling resource themselves
Do not pass
resource. A script should not have to name itself correctly to get its own channel.Where an entry goes, in order: a destination the entry carries as key, then a channel it named, then the calling resource’s own channel, then the fallback. A channel name that does not exist still sends, to the fallback, because losing the entry is worse than filing it in the wrong place.Restarting the bridge orphans your zones
Restarting the bridge orphans your zones
Zones are the one place a function crosses a resource boundary. Restarting the bridge drops every zone a script registered, so rebuild yours on
awoken_bridge:started.Adding a backend
Every file undermodules/ ships readable, one per resource the bridge talks to. That is deliberate: they are glue against somebody else’s public API, and a server on a fork or a newer build needs to be able to fix one rather than wait for us.
1
Write the file
modules/dispatch/your_resource.lua. Copy the nearest existing adapter and change what it sends. Every one starts the same way:main.lua.2
List it in fxmanifest.lua
An unlisted backend never loads and
auto simply never picks it, with nothing in the console to say so.3
Name it in config
config/core.lua