Skip to content

OnPlayerEnterZone

A player’s position of record entered a zone.

function OnPlayerEnterZone(pid, zone)
-- ...
end
Parameter Type
pid number the player
zone number the zone

nothing

function OnPlayerEnterZone(pid, zone)
if zone == spawnZone then GameText(pid, "The spawn", 1500, GAMETEXT_LOWER) end
if GetZoneData(zone, "safe") then SendClientMessage(pid, COLOUR_GREEN, "You are safe here.") end
end

OnPlayerLeaveZone · CreateZone · IsPlayerInZone · the Zones group of the index