Skip to content

OnPlayerLeaveArea

A player left one of the map’s areas.

They walked out, were moved, or the area was changed, taken away or its layer switched off. Not when they leave the server (OnPlayerDisconnect).

function OnPlayerLeaveArea(pid, area)
-- ...
end
Parameter Type
pid number the player
area string the area’s name
function OnPlayerLeaveArea(pid, area)
if area == "Arena" then EndFight(pid) end
end

OnPlayerEnterArea · the The map’s areas group of the index