ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getRoofPosition

Function

getRoofPosition

ServerWorldIdentical to MTA:SA

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

See also