Events.PlayerDropItem(function(event)
if (event.itemType == ItemType.TENNIS_BALL) then
event.cancelled = true
MessageService.sendInfo(event.player, "Be more careful! Those can explode!")
end
end)
Parameters
player:
The player that is dropping the item.
itemType:
The type of item being dropped by the player.
amount: number
The amount of the item being dropped by the player.
cancelled: bool [modifiable]
If set to true, the item drop event will be cancelled.