ConsumeItem

Fires when an item is consumed.

-- Make a player jump twice as high every time they eat a pie item
Events.ConsumeItem(function(event)
    if (event.item == ItemType.PIE) then
        event.player:registerJumpHeightMultiplier("pie_jumps", 2)
    end
end)

Parameters

player: Player

The player that consumed the item.

itemType: ItemType

The item that was consumed by the player.

cancelled: bool [modifiable]

If set to true the item consume will be cancelled.

Last updated