> For the complete documentation index, see [llms.txt](https://wosa.gitbook.io/working-with-wosa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wosa.gitbook.io/working-with-wosa/events/client-events/inventory.md).

# Inventory

### On inventory update

This event is **triggered** when a item is removed or added from the user.

```lua
AddEventHandler('__WOSA:INVENTORY_UPDATE', function(inv_data)

end)
```

### On item use

This event is **triggered** when a user is using a inventory item through the main menu.

{% tabs %}
{% tab title="itemName" %}
The item index name in the database, in the database it is represented as `item_name`.
{% endtab %}

{% tab title="itemDisplayName" %}
The display name often used as the "item name" for users such as in inventory list.
{% endtab %}

{% tab title="itemDatabaseID" %}
The database unique id key.
{% endtab %}

{% tab title="itemRemovedOnUse" %}
If the item was a item that got removed on use as a bool.
{% endtab %}
{% endtabs %}

```lua
AddEventHandler('__WOSA:ITEM_USE', function(itemName, itemDisplayName, itemDatabaseID, itemRemovedOnUse)

end)
```

###

### On item add

This event is **triggered** when a user gets a item from the system.

{% tabs %}
{% tab title="itemName" %}
he item index name in the database, in the database it is represented as `item_name`.
{% endtab %}

{% tab title="itemDisplayName" %}
The display name often used as the "item name" for users such as in inventory list.
{% endtab %}
{% endtabs %}

```lua
AddEventHandler('__WOSA:ITEM_ADD', function(itemName, itemDisplayName)

end)
```

###

### On item give

This event is **triggered** when a user gives a item to another user.

{% tabs %}
{% tab title="receiverPlayerID" %}
The receiver server id of the player who received the item.
{% endtab %}

{% tab title="itemName" %}

{% endtab %}

{% tab title="itemDisplayName" %}

{% endtab %}

{% tab title="itemDatabaseID" %}

{% endtab %}
{% endtabs %}

```lua
AddEventHandler('__WOSA:ITEM_GIVE', function(receiverPlayerID, itemName, itemDisplayName, itemDatabaseID)

end)
```

###

### On item drop

This event is **triggered** when a item is dropped.&#x20;

{% tabs %}
{% tab title="itemName" %}
The item index name in the database, in the database it is represented as `item_name`.
{% endtab %}

{% tab title="itemDisplayName" %}
The display name often used as the "item name" for users such as in inventory list.
{% endtab %}

{% tab title="itemDatabaseID" %}
The database unique id key.
{% endtab %}
{% endtabs %}

```lua
AddEventHandler('__WOSA:ITEM_DROP', function(itemName, itemDisplayName, itemDatabaseID)

end)
```

###

### On item pickup

{% hint style="warning" %}
This event is not yet in use by any core resource(s). **However**, This event will be activated as soon as the *new* inventory drop and pickup system is implemented.
{% endhint %}

This event is **triggered** when a user picks up a item another user has dropped.

{% tabs %}
{% tab title="coordsOfItem" %}
The coords of the dropped item. Table are in **.x**, **.y**, **.z** form.
{% endtab %}

{% tab title="itemName" %}
&#x20;in the database, in the database it is represented as `item_name`.
{% endtab %}

{% tab title="itemDisplayName" %}
The display name often used as the "item name" for users such as in inventory list.
{% endtab %}
{% endtabs %}

```lua
AddEventHandler('__WOSA:ITEM_PICKUP', function(coordsOfItem, itemName, itemDisplayName)

end)
```
