Skip to content

Inventories

config/server.lua exists for one case: an inventory that is neither ox_inventory nor your framework’s own.

If you run either of those, this file needs nothing.

Call Feeds
GetCount Reserve ammo and consumable counts
Remove The stress items configured in /hud → Admin
OnUse (optional) Item use, when your inventory registers usable items itself

Without OnUse, item use goes through your framework’s usable items instead.

The first of these found running wins:

Resource Count Remove Usable items
qs-inventory GetItemTotalAmount RemoveItem CreateUsableItem
jaksam_inventory getTotalItemAmount removeItem registerUsableItem
tgiann-inventory GetItemCount RemoveItem
ak47_inventory GetAmount RemoveItem
ak47_qb_inventory GetAmount RemoveItem

Adding another inventory that follows the same pattern is one line in that table — the resource name and the three export names.

If your inventory does not fit the table, replace it with the adapter directly. GetCount and Remove are required, OnUse is optional:

Custom.Inventory = {
GetCount = function(src, itemName)
return 0
end,
Remove = function(src, itemName, count)
return true
end,
}

Restart the resource after editing:

restart hud