OnPlayerArrive
A player who came on a trip from another region spawned here.
Comes once a visit, right after OnPlayerSpawn. GetPlayerArrival has the same from their join on.
Syntax
Section titled “Syntax”function OnPlayerArrive(pid, fromRegion, data) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
fromRegion |
string | the region they left |
data |
string | the data sent with them, "" for none |
Example
Section titled “Example”function OnPlayerArrive(pid, fromRegion, data) SendClientMessageToAll(0xFFD070FF, GetPlayerName(pid) .. " arrived from " .. fromRegion)endSee also
Section titled “See also”OnPlayerTravel · GetPlayerArrival · SendPlayerToRegion · the Regions group of the index
