Newb_BridgeMigrating

Migrating from community_bridge

Replace community_bridge with Newb_Bridge in a resource you control. This is a rewrite of the call surface, not a drop-in rename.

Newb_Bridge covers the modules MrNewb scripts use. community_bridge modules that have no counterpart stay on community_bridge, or you call the underlying resource yourself.

Swap the import

Stop starting community_bridge for that resource. Start Newb_Bridge after ox_lib, the framework, and the inventory/target you already run. Details: Installation.

-- fxmanifest.lua
shared_scripts {
    '@ox_lib/init.lua',
    '@Newb_Bridge/import.lua',
}
 
dependencies {
    'ox_lib',
    'Newb_Bridge',
}
-- Old
local Bridge = exports.community_bridge:Bridge()
Bridge.Framework.GetPlayerIdentifier(src)
 
-- New — `bridge` is global after import.lua
bridge.framework.getIdentifier(src)

Do not keep both bridges in the same consumer. bridge and Bridge are different objects.

Conventions that apply everywhere

community_bridgeNewb_Bridge
Bridge.Module.PascalCase(...)bridge.module.camelCase(...)
exports.community_bridge:Bridge()@Newb_Bridge/import.lua → global bridge
exports.community_bridge:Framework()bridge.framework (host-proxied)
GetResourceName()getResourceName()
Optional QB-format flags (useQb, isQBFormat, isQBInput)ox_lib-shaped tables only
Inventory slot before metadatametadata before slot
Framework methods for itemsbridge.inventory

Lifecycle events: Events.

community_bridgeNewb_BridgePayload
community_bridge:Server:OnPlayerLoadedNewb_Bridge:server:playerLoadsrc
community_bridge:Server:OnPlayerUnloadNewb_Bridge:server:playerUnloadsrc
community_bridge:Client:OnPlayerLoadedNewb_Bridge:client:playerLoadnone
community_bridge:Client:OnPlayerUnloadNewb_Bridge:client:playerUnloadnone
community_bridge:Server:OnPlayerJobChangeNewb_Bridge:server:playerJobUpdatesrc, jobName
QBCore:Client:OnJobUpdate / esx:setJobNewb_Bridge:client:playerJobUpdatejobName, jobLabel, gradeName, gradeLevel

Listen with AddEventHandler. Only the host emits these.

Module guides

community_bridgeNewb_BridgeGuide
Bridge.Frameworkbridge.frameworkFramework
Bridge.Inventorybridge.inventoryInventory
Bridge.Notifybridge.notificationsNotifications
Bridge.HelpTextbridge.textuiText UI
Bridge.Menubridge.menuMenu
Bridge.Inputbridge.inputsInputs
Bridge.ProgressBarbridge.progressbarProgress bar
Bridge.Targetbridge.targetTarget
Bridge.VehicleKeybridge.vehiclekeysVehicle keys
Bridge.Fuelbridge.vehiclefuelVehicle fuel
Bridge.BossMenubridge.bossmenuBoss menu
Bridge.Dispatchbridge.dispatchDispatch
Bridge.Dialoguebridge.dialogueDialogue
Bridge.Entity / Placeable / Callback / Version / Language / cZonesutilities + ox_libLibraries and utilities

No Newb_Bridge equivalent

These community_bridge modules are out of scope. Leave them on community_bridge, or talk to the resource they wrap.

ModuleWhat it did
Bridge.BankingSociety / management accounts (GetAccountMoney, AddAccountMoney). Player wallets are bridge.framework.getMoney / addMoney / removeMoney.
Bridge.ClothingAppearance get/set/restore and clothing menus
Bridge.DoorlockToggleDoorLock, GetClosestDoor
Bridge.HousingProperty enter/leave
Bridge.PhonePhone number and emails
Bridge.ShopsBuilt-in shop UI (OpenShop, CreateShop, checkout). Inventory-backed shops are bridge.inventory.registerShop / openShop.
Bridge.SkillsXP / skill levels
Bridge.WeatherWeather sync toggle
Bridge.SQL / Logs / Scaleform / Particle / Cutscene / Marker / Anim / Shell / Raycast / Math / TablescLib helpers. Use ox_lib, oxmysql, or natives.
⚠️

bridge.framework.getPlayer is a cached snapshot (charId, name, groups, hasGroup). It is not the QB/ESX player object community_bridge returned from GetPlayer. Do not call .Functions or .PlayerData on it.