Client
Events
Client-side events.
Client-side events are emitted with TriggerEvent (client-local). Subscribe from any other client script.
For inventory state changes you can act on from your own resources, prefer the server-side Events: they fire once on the server and your code stays authoritative.
onInventoryUpdate
Fires whenever the local inventory mirror changes (item added, removed, swapped, used).
RegisterNetEvent('one_inventory:onInventoryUpdate', function(payload) end)
payload.slots
table<number, table>
Slot map, indexed by slot id.
payload.weight
number
Current carried weight in grams.
payload.maxWeight
number
Max carry weight in grams.
onItemCountChange
Fires once per item name whose total count changed in the latest sync.
RegisterNetEvent('one_inventory:onItemCountChange', function(payload) end)
payload.item
string
Item name.
payload.oldCount
number
Total before the change.
payload.newCount
number
Total after the change.
0 when every stack of the item was removed.onItemUsed
Fires on the client when a UseItem flow completes successfully.
RegisterNetEvent('one_inventory:onItemUsed', function(payload) end)
payload.item
string
payload.slot
number
payload.metadata
table
onWeaponChange
Fires when the locally-equipped weapon changes (equip or disarm).
RegisterNetEvent('one_inventory:onWeaponChange', function(payload) end)
payload.action
string
'equip' or 'disarm'.payload.slot
number
Slot index of the weapon.
payload.weapon
string
Weapon item name.
