GetPlayerLocation: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|player|The | {{FuncParam|player|The player identifier.)}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns three float value X, Y, Z representing the players location.}} | ||
== Example == | == Example == |
Revision as of 13:35, 23 November 2019
Description
Get the specified client's location.
Syntax
GetPlayerLocation(player)
Parameters
- player
The player identifier.)
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)