Skip to content

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.

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
function OnPlayerArrive(pid, fromRegion, data)
SendClientMessageToAll(0xFFD070FF, GetPlayerName(pid) .. " arrived from " .. fromRegion)
end

OnPlayerTravel · GetPlayerArrival · SendPlayerToRegion · the Regions group of the index