GetPlayerLocation

From Onset Developer Wiki
Revision as of 13:36, 23 November 2019 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetPlayerLocation

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Get the specified client's location.

Syntax

GetPlayerLocation(player)

Parameters

  • player
    The player identifier. On the client this parameter is optional and will return the local player location if not set.

Return Value

  • Returns three float value X, Y, Z representing the players location.

Example

AddEvent("OnRenderHUD", function()
	local x, y, z = GetPlayerLocation()
	AddPlayerChat("Player location: "..x..", "..y..", "..z)
end)

See also