getApproxHeightForPoint

GET_APPROX_HEIGHT_FOR_POINT0x29C24BFBED8AB8FB

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

SignatureJavaScript
getApproxHeightForPoint(x: number, y: number): number
SignatureLua
getApproxHeightForPoint(x: number, y: number): number

Usage

JavaScript
const value = getApproxHeightForPoint(x, y);
Lua
local value = getApproxHeightForPoint(x, y)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber

Returns

float JavaScript number, Lua number

Reference

Namespace
Pathfinding PATHFIND
In the game
float GET_APPROX_HEIGHT_FOR_POINT(float x, float y)
Hash
0x29C24BFBED8AB8FB
Formerly
_GET_HEIGHTMAP_TOP_Z_FOR_POSITION

Open in the interactive natives reference