RemoveItem
The RemoveItem export allows you to remove items from a player's inventory. It is particularly useful for managing items with metadata but can also be used to remove items without metadata.
How to Use
Removing Items with Metadata
If the item has metadata, use the following example:
Removing Items Without Metadata
If metadata is not needed, you can use this simpler version:
Explanation
source
: The player's source ID.item
: The name of the item to remove.count
: The quantity of the item to remove.slot
: (Optional) Specify a slot to target; usenil
to remove from any slot.metadata
: (Optional) Specify metadata to match the item you want to remove.
This export provides flexibility for managing player inventories, whether you're removing basic items or handling items with specific attributes.
Last updated