InventoryItemAdded

Fires when a new item is added to a player's inventory.

Example usage:

Events.InventoryItemAdded(function(event)
    -- Sends a notification to a player that receives the Laser Sword item
    if (event.item == ItemType.LASER_SWORD) then
        MessageService.sendInfo(event.player, "You have unlocked the power of the force!")
    end
end)

Parameters

player: Player

The player who received a new item.

item: ItemType

The type of item received by the player.

amount: number

The amount of the item received by the player.

Last updated