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)

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)

Simulates a player using an item.

exports['devm-bridge']:UseItem(source, 'phone')

AddMoney(id, amount)

Adds cash to a player.

exports['devm-bridge']:AddMoney(source, 1000)

RemoveMoney(id, amount)

Removes cash from a player.


AddAccountMoney(id, account, amount)

Adds money to a specific account:

  • cash, bank, or black_money / dirty_money

If Config.blackMoneyAsItem = true, it uses inventory instead.


RemoveAccountMoney(id, account, amount)

Removes money from a specific account.


GetAccountMoney(id, account)

Returns current balance of the selected account.


GetJob(id)

Returns the player’s job name.


GetWeight(id)

Returns current carried inventory weight.


GetIdentifier(id)

Returns the player’s license identifier.


GetCoords(id)

Returns player’s world coordinates.


GetName(id)

Returns the player's full name.


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?)

Adds item to a player’s inventory.


RemoveInventoryItem(id, item, count, metadata?)

Removes item from a player’s inventory.

With metadata filtering:


GetInventoryItem(id, item)

Returns first matching item or default { count = 0 }.


GetInventoryItems(id, item)

Returns all slots of a matching item.


SetItemMetadata(id, slot, metadata)

Modifies metadata of a given item slot. Only works in ox_inventory and qb-inventory.


🔄 Notes

  • Framework must be set to one of: es_extended, qb-core, qbx_core

  • Inventory must be one of: ox_inventory, qb-inventory, qs-inventory

  • blackMoneyAsItem = true will store black/dirty money as an inventory item (Config.blackMoneyAsItem name)

  • All exports are internally adapted to each system’s format:

    • amountcount

    • infometadata

    • cash vs money

Last updated