OnPlayerCloseContainer
A player closed a container; the record holds what they left in it.
Syntax
Section titled “Syntax”function OnPlayerCloseContainer(pid, key) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
key |
string | the container’s level name |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnPlayerCloseContainer(pid, key) local items = GetContainerItems(key) or {} Log(GetPlayerName(pid), "closed", key, "with", #items, "stacks left")endSee also
Section titled “See also”OnPlayerOpenContainer · GetContainerItems · SetContainerItems · the Doors and containers group of the index
