OnPlayerCloseShop
The shop screen closed on a player.
reason is "" for the player’s own close (Esc), else why the server took it down: "you walked away", "the vendor is gone", "you died", "you left", "closed by the game mode" (CloseShop), "the shop closed"
(DestroyShop), "the vendor stopped trading" (SetActorShop with nil), "another shop opened".
Syntax
Section titled “Syntax”function OnPlayerCloseShop(pid, shop, reason) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
shop |
number | the shop |
reason |
string | why; "" = their own close |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnPlayerCloseShop(pid, shop, reason) if reason == "" then SendClientMessage(pid, COLOR_SERVER, "Come again.") endendSee also
Section titled “See also”OpenShop · CloseShop · the Shops and vendors group of the index
