OnPlayerDrop
The player dropped an item and the world made a pickup of it.
The player’s own game dropped the item; the server made pickup id of it so everyone sees it lying there and anyone may take
it. Nothing to veto - the dropper’s screen already shows it; a mode that wants it gone calls DestroyEntity.
Syntax
Section titled “Syntax”function OnPlayerDrop(pid, id) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
id |
number | the new pickup entity |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”-- dropped items vanish after two minutesfunction OnPlayerDrop(pid, id) SetTimer(function() DestroyEntity(id) end, 120000)endSee also
Section titled “See also”OnPlayerPickup · DestroyEntity · GetEntityTemplate · the Items and inventory group of the index
