Inventory Integration
✅ ox_inventory and qs-inventory already integrated with rm_houserobbery.
qb-inventory Integration
This guide is for qb-inventory 2.0.0. If you are using an older version of qb-core, the AddItem and RemoveItem functions might be located in qb-core/server/player.lua or in any of the files within qb-inventory/server/.
Add Item Events to qb-inventory
To add item-related events to qb-inventory
, follow these steps:
1. Modifying the AddItem
Function
AddItem
FunctionIn the file qb-inventory/server/functions.lua
, locate the AddItem
function. To trigger events when an item is added, insert the following code before the line return true
TriggerEvent('qb-inventory:server:itemAdded', identifier, item, amount, updated or amount)
TriggerClientEvent('qb-inventory:client:itemAdded', identifier, item, amount, updated or amount)

2. Modifying the RemoveItem
Function
RemoveItem
FunctionSimilarly, locate the RemoveItem
function in qb-inventory/server/functions.lua
. Add the following lines of code before the return true
statement to trigger events when an item is removed:
TriggerEvent('qb-inventory:server:itemRemoved', identifier, item, amount, inventoryItem.amount)
TriggerClientEvent('qb-inventory:client:itemRemoved', identifier, item, amount, inventoryItem.amount)

Custom Inventory
Steps to Integrate Your Custom Inventory Script
Assign Events to Functions: In your custom inventory script, place the events for the
AddItem
andRemoveItem
functions at the appropriate locations as specified.Copy and Rename the File:
Navigate to the
rm_houserobbery/bridge/inventory
folder.Copy one of the existing inventory script files. (like qb-inventory)
Rename the copied file to match the name of your custom inventory script.
Update Event Names: Open the newly created file and replace the event names with the ones you assigned in Step 1.
That’s all! You now have your custom inventory script integrate.
Last updated