Server-Side
This section documents all server-side exports from devm-bridge, unified across: Frameworks: es_extended, qb-core, qbx_core Inventories: ox_inventory, qb-inventory, qs-inventory
🔁 Core Framework Exports
RegisterUsableItem(item, callback)
RegisterUsableItem(item, callback)Registers a usable item from inventory.
exports['devm-bridge']:RegisterUsableItem('usb', function(source)
print(('Player %s used a USB'):format(source))
end)UseItem(id, item)
UseItem(id, item)Simulates a player using an item.
exports['devm-bridge']:UseItem(source, 'phone')AddMoney(id, amount)
AddMoney(id, amount)Adds cash to a player.
exports['devm-bridge']:AddMoney(source, 1000)RemoveMoney(id, amount)
RemoveMoney(id, amount)Removes cash from a player.
AddAccountMoney(id, account, amount)
AddAccountMoney(id, account, amount)Adds money to a specific account:
cash,bank, orblack_money/dirty_money
If Config.blackMoneyAsItem = true, it uses inventory instead.
RemoveAccountMoney(id, account, amount)
RemoveAccountMoney(id, account, amount)Removes money from a specific account.
GetAccountMoney(id, account)
GetAccountMoney(id, account)Returns current balance of the selected account.
GetJob(id)
GetJob(id)Returns the player’s job name.
GetWeight(id)
GetWeight(id)Returns current carried inventory weight.
GetIdentifier(id)
GetIdentifier(id)Returns the player’s license identifier.
GetCoords(id)
GetCoords(id)Returns player’s world coordinates.
GetName(id)
GetName(id)Returns the player's full name.
Kick(id, reason)
Kick(id, reason)Kicks the player with a custom reason.
📦 Inventory Exports
Supported for: ox_inventory, qb-inventory, qs-inventory
AddInventoryItem(id, item, count, metadata?)
AddInventoryItem(id, item, count, metadata?)Adds item to a player’s inventory.
RemoveInventoryItem(id, item, count, metadata?)
RemoveInventoryItem(id, item, count, metadata?)Removes item from a player’s inventory.
With metadata filtering:
GetInventoryItem(id, item)
GetInventoryItem(id, item)Returns first matching item or default { count = 0 }.
GetInventoryItems(id, item)
GetInventoryItems(id, item)Returns all slots of a matching item.
SetItemMetadata(id, slot, metadata)
SetItemMetadata(id, slot, metadata)Modifies metadata of a given item slot.
Only works in ox_inventory and qb-inventory.
🔄 Notes
Frameworkmust be set to one of:es_extended,qb-core,qbx_coreInventorymust be one of:ox_inventory,qb-inventory,qs-inventoryblackMoneyAsItem = truewill store black/dirty money as an inventory item (Config.blackMoneyAsItemname)All exports are internally adapted to each system’s format:
amount➝countinfo➝metadatacashvsmoney
Last updated