Skip to content

GetPlayerVirtualWorld

The virtual world the player is in.

Players and entities are replicated to each other within one world only; 0 is the shared world. A registered name waiting for its /login sits in a world of its own. See Getting started and SetPlayerVirtualWorld.

GetPlayerVirtualWorld(pid)
Parameter Type
pid number the player

number - the world; nil when not connected

if GetPlayerVirtualWorld(pid) ~= 0 then SendClientMessage(pid, COLOUR_SERVER, "You are in a private instance.") end

SetPlayerVirtualWorld · GetEntityVirtualWorld · the Players group of the index