Client-side event listeners triggered by inventory interactions, weapon swaps, and clothing changes.
Fired when an item is removed from the local player's inventory.
RegisterNetEvent('ak47_inventory:onRemoveItem', function(item, amount, slot, has)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
item |
string | Yes | Item identifier name |
amount |
number | Yes | Quantity removed |
slot |
number | Yes | Inventory slot index |
has |
number | Yes | Remaining item quantity |
Fired when an item is added to the local player's inventory.
RegisterNetEvent('ak47_inventory:onAddItem', function(item, amount, slot, has)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
item |
string | Yes | Item identifier name |
amount |
number | Yes | Quantity added |
slot |
number | Yes | Inventory slot index |
has |
number | Yes | Updated total item quantity |
Fired when the local player equips a weapon.
RegisterNetEvent('ak47_inventory:onEquipWeapon', function(currentWeapon)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
currentWeapon |
table | Yes | Weapon item data table |
Fired when the local player unequips their weapon.
RegisterNetEvent('ak47_inventory:onUnEquipWeapon', function(currentWeapon)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
currentWeapon |
table | Yes | Unequipped weapon data table |
Fired when the local player equips a clothing item.
RegisterNetEvent('ak47_inventory:onAddClothing', function(clothingType, skinData, toOtherInventory)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
clothingType |
string | Yes | Clothing category name (e.g. mask, helmet) |
skinData |
table | Yes | Character appearance drawable metadata |
toOtherInventory |
boolean | Yes | Whether item came from an external inventory |
Fired when the local player removes a clothing item.
RegisterNetEvent('ak47_inventory:onRemoveClothing', function(clothingType, toOtherInventory)
-- Code execution
end)| Parameter | Type | Required | Description |
|---|---|---|---|
clothingType |
string | Yes | Clothing category name (e.g. mask, helmet) |
toOtherInventory |
boolean | Yes | Whether transferred to an external inventory |