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.
Syntax
Section titled “Syntax”function OnPlayerEnterArea(pid, area) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
area |
string | the area’s name |
Example
Section titled “Example”function OnPlayerEnterArea(pid, area) if GetAreaProperty(area, "pvp") == false then SendClientMessage(pid, COLOR_GREEN, "You are safe here.") endendSee also
Section titled “See also”OnPlayerLeaveArea · GetPlayerAreas · the The map’s areas group of the index
