- Documentation
- Server functions
- getRoofPosition
Function
getRoofPosition
Returns the height of the lowest obstacle above a point (whether there is a roof overhead), according to the server's model: only script objects, without map buildings.
Syntax
float getRoofPosition(float x, float y, float z)Arguments
xfloat- X coordinate (or a vector).
yfloat- Y coordinate.
zfloat- The height to search up from.
Returns
The obstacle height, or false (open sky).
Example
local x, y, z = 2495, -1665, 13.3
if getRoofPosition(x, y, z) then outputDebugString("Pod dachem") end