Skip to content

OnPlayerEnterArea

A player came into one of the map’s areas.

Checked ten times a second against where the player stands. A player standing in several areas gets one call for each. After a mode reload the new mode hears every player’s areas as entered again.

function OnPlayerEnterArea(pid, area)
-- ...
end
Parameter Type
pid number the player
area string the area’s name
function OnPlayerEnterArea(pid, area)
if GetAreaProperty(area, "pvp") == false then
SendClientMessage(pid, COLOR_GREEN, "You are safe here.")
end
end

OnPlayerLeaveArea · GetPlayerAreas · the The map’s areas group of the index