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.
Syntax
Section titled “Syntax”GetPlayerPos(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”number, number, number - three numbers x, y, z; nil when not connected
Example
Section titled “Example”local x, y, z = GetPlayerPos(pid)if x then CreatePickup("torch_weapon", x + 1, y, z)endSee also
Section titled “See also”GetPlayerYaw · GetPlayerVelocity · SetPlayerPos · GetTerrainHeight · the Players group of the index
