Modules
After you import @Newb_Bridge/import.lua, everything hangs off the bridge table.
You get at all of this through the bridge table once @Newb_Bridge/import.lua is in. A module loads the first time you touch it, based on the provider you set in Configuration. The host preloads every provider you configured when it starts.
Modules without an implementation become a no-op table (every method does nothing). bridge.dialogue and bridge.task error if accessed on the server. bridge.dispatch, bridge.bossmenu, bridge.banking and bridge.phone are host-only on the client (consumer clients get the noop table). bridge.weather is client-only.
Available modules
| Module | Client | Server |
|---|---|---|
bridge.framework | Client | Server |
bridge.inventory | Client | Server |
bridge.notifications | Client | Server |
bridge.menu | Client | Server |
bridge.inputs | Client | Server |
bridge.progressbar | Client | Server |
bridge.textui | Client | Server |
bridge.target | Client | Server |
bridge.vehiclekeys | Client | Server |
bridge.vehiclefuel | Client | Server |
bridge.bossmenu | Client | Server |
bridge.dispatch | Client | Server |
bridge.banking | Client | Server |
bridge.doorlock | Client | Server |
bridge.phone | Client | Server |
bridge.weather | Client | Server |
bridge.dialogue | Client | Server |
bridge.taskGroups | Client | Server |
bridge.task | Client | Server |
Related docs
- Utilities:
PropPlacer,AddInteraction,VersionCheck, and other exports - Events: player load/unload and bridge events
- Migrating: community_bridge → Newb_Bridge
Missing or broken providers
bridge.banking, bridge.doorlock, bridge.phone and bridge.weather never throw into your script. With no provider installed they resolve to none, which does nothing. Arguments of the wrong type (a non-string account, an amount that is not a number above 0, a door id that is not a string or number, a non-numeric player id, non-string mail text) return the fallback without reaching the provider. If the provider resource is stopped later, or one of its exports errors, the call returns the same fallback (0, false or nil) and the bridge prints one console line per call name.
Notes
- Server money:
getMoney/addMoney/removeMoneyare the authoritative money APIs. ClientgetAccountBalanceis display-only. - Host-proxied:
bridge.framework(and inventory when the provider isqb-inventory/qb-framework/esx-framework) is a funcref into Newb_Bridge. Do not call it per-frame.
