Skip to content

GetPlayerArrival

The region a player came from on a trip, and the data sent with them.

Holds from their join on, so OnPlayerConnect can read it - say, to let a player who was logged in there stay logged in. The data comes in a signed pass, so a player can read it but not change it. nil for anyone who did not come on a trip.

GetPlayerArrival(pid)
Parameter Type
pid number the player

string, string - the region and the data, or nil

function OnPlayerConnect(pid)
local from, data = GetPlayerArrival(pid)
if from and data == "logged" then
loadCharacter(pid)
else
askPassword(pid)
end
end

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