GetNearestDoor: Difference between revisions
From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|Gets the nearest door from the specified XYZ vector created earlier with CreateDoor.}} {{FuncSyntax|GetNearestDoor(x, y, z...") |
(No difference)
|
Latest revision as of 14:04, 1 January 2020
Description
Gets the nearest door from the specified XYZ vector created earlier with CreateDoor.
Syntax
GetNearestDoor(x, y, z)
Parameters
- x
The X axis - y
The Y axis - z
The Z axis
Return Value
- the door identifier on success.
Example
local x, y, z = GetPlayerLocation()
local doorId = GetNearestDoor(x, y, z)
if doorId ~= 0 then
print("No nearby door was found.")
end