GetPlayerLocation

From Onset Developer Wiki
Revision as of 14:42, 14 November 2019 by 28days (talk | contribs)
GetPlayerLocation

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

Description

Get the specified client's location.

Syntax

GetPlayerLocation(player)

Parameters

  • player
    The client identifier (unneeded in client)

Return Value

  • The client's location.

Example

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

See also