getApproxHeightForArea

GET_APPROX_HEIGHT_FOR_AREA0x8ABE8608576D9CE3

The GTA V native GET_APPROX_HEIGHT_FOR_AREA of the PATHFIND namespace, as LS:MP client scripts call it: the global function getApproxHeightForArea, in JavaScript and in Lua.

SignatureJavaScript
getApproxHeightForArea(x1: number, y1: number, x2: number, y2: number): number
SignatureLua
getApproxHeightForArea(x1: number, y1: number, x2: number, y2: number): number

Usage

JavaScript
const value = getApproxHeightForArea(x1, y1, x2, y2);
Lua
local value = getApproxHeightForArea(x1, y1, x2, y2)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber

Returns

float JavaScript number, Lua number

Reference

Namespace
Pathfinding PATHFIND
In the game
float GET_APPROX_HEIGHT_FOR_AREA(float x1, float y1, float x2, float y2)
Hash
0x8ABE8608576D9CE3
Formerly
_GET_HEIGHTMAP_TOP_Z_FOR_AREA

Open in the interactive natives reference