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.
exports['devm-bridge']:RemoveMoney(source, 500)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.
exports['devm-bridge']:AddAccountMoney(source, 'bank', 2000)
exports['devm-bridge']:AddAccountMoney(source, 'black_money', 100)RemoveAccountMoney(id, account, amount)
RemoveAccountMoney(id, account, amount)Removes money from a specific account.
exports['devm-bridge']:RemoveAccountMoney(source, 'cash', 500)GetAccountMoney(id, account)
GetAccountMoney(id, account)Returns current balance of the selected account.
local bank = exports['devm-bridge']:GetAccountMoney(source, 'bank')GetJob(id)
GetJob(id)Returns the player’s job name.
local job = exports['devm-bridge']:GetJob(source)
print(job) -- e.g. "police"GetWeight(id)
GetWeight(id)Returns current carried inventory weight.
local weight = exports['devm-bridge']:GetWeight(source)
print('Weight:', weight)GetIdentifier(id)
GetIdentifier(id)Returns the player’s license identifier.
local license = exports['devm-bridge']:GetIdentifier(source)
print('License:', license)GetCoords(id)
GetCoords(id)Returns player’s world coordinates.
local coords = exports['devm-bridge']:GetCoords(source)
print(json.encode(coords))GetName(id)
GetName(id)Returns the player's full name.
local name = exports['devm-bridge']:GetName(source)
print('Name:', name)Kick(id, reason)
Kick(id, reason)Kicks the player with a custom reason.
exports['devm-bridge']:Kick(source, 'Exploiting detected.')📦 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.
exports['devm-bridge']:AddInventoryItem(source, 'phone', 1, { serial = "XYZ-123" })RemoveInventoryItem(id, item, count, metadata?)
RemoveInventoryItem(id, item, count, metadata?)Removes item from a player’s inventory.
exports['devm-bridge']:RemoveInventoryItem(source, 'usb', 1)With metadata filtering:
exports['devm-bridge']:RemoveInventoryItem(source, 'usb', 1, { type = 'data' })GetInventoryItem(id, item)
GetInventoryItem(id, item)Returns first matching item or default { count = 0 }.
local phone = exports['devm-bridge']:GetInventoryItem(source, 'phone')
print(phone.count)GetInventoryItems(id, item)
GetInventoryItems(id, item)Returns all slots of a matching item.
local allWaterBottles = exports['devm-bridge']:GetInventoryItems(source, 'water')
for _, bottle in pairs(allWaterBottles) do
print(bottle.count, json.encode(bottle.metadata))
endSetItemMetadata(id, slot, metadata)
SetItemMetadata(id, slot, metadata)Modifies metadata of a given item slot.
Only works in ox_inventory and qb-inventory.
exports['devm-bridge']:SetItemMetadata(source, 4, {
serial = "NEW-456",
status = "used"
})🔄 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
Let me know if you want a `README.md` version auto-generated from this, or if you plan to add UI notifications or weapon metadata next!Last updated