Skip to content

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".

function OnPlayerCloseShop(pid, shop, reason)
-- ...
end
Parameter Type
pid number the player
shop number the shop
reason string why; "" = their own close

nothing

function OnPlayerCloseShop(pid, shop, reason)
if reason == "" then SendClientMessage(pid, COLOR_SERVER, "Come again.") end
end

OpenShop · CloseShop · the Shops and vendors group of the index