GetNearestDoor
From Onset Developer Wiki
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