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

ModuleClientServer
bridge.frameworkClientServer
bridge.inventoryClientServer
bridge.notificationsClientServer
bridge.menuClientServer
bridge.inputsClientServer
bridge.progressbarClientServer
bridge.textuiClientServer
bridge.targetClientServer
bridge.vehiclekeysClientServer
bridge.vehiclefuelClientServer
bridge.bossmenuClientServer
bridge.dispatchClientServer
bridge.bankingClientServer
bridge.doorlockClientServer
bridge.phoneClientServer
bridge.weatherClientServer
bridge.dialogueClientServer
bridge.taskGroupsClientServer
bridge.taskClientServer
  • 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 / removeMoney are the authoritative money APIs. Client getAccountBalance is display-only.
  • Host-proxied: bridge.framework (and inventory when the provider is qb-inventory / qb-framework / esx-framework) is a funcref into Newb_Bridge. Do not call it per-frame.

On this page