Skip to content

GetPlayerPos

The player’s position of record.

Metres in the level’s world space, from the client’s reports (thirty a second); a mounted player’s position is the horse’s. A report that would move a player faster than [validation] max_speed allows is refused and the client pulled back, so the record is the server’s own opinion of where they are.

GetPlayerPos(pid)
Parameter Type
pid number the player

number, number, number - three numbers x, y, z; nil when not connected

local x, y, z = GetPlayerPos(pid)
if x then
CreatePickup("torch_weapon", x + 1, y, z)
end

GetPlayerYaw · GetPlayerVelocity · SetPlayerPos · GetTerrainHeight · the Players group of the index