EntityClient

getEntityHeight

GET_ENTITY_HEIGHT0x5A504562485944DD

The GTA V native GET_ENTITY_HEIGHT of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityHeight, in JavaScript and in Lua.

SignatureJavaScript
getEntityHeight(
  entity: Entity,
  X: number,
  Y: number,
  Z: number,
  atTop: boolean,
  inWorldCoords: boolean
): number
SignatureLua
getEntityHeight(
  entity: Entity,
  X: number,
  Y: number,
  Z: number,
  atTop: boolean,
  inWorldCoords: boolean
): number

Usage

JavaScript
const value = getEntityHeight(entity, X, Y, Z, atTop, inWorldCoords);
Lua
local value = getEntityHeight(entity, X, Y, Z, atTop, inWorldCoords)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const value = getEntityHeight(entity, pos, atTop, inWorldCoords);
Lua · with vectors
local value = getEntityHeight(entity, pos, atTop, inWorldCoords)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
Xfloatnumbernumber
Yfloatnumbernumber
Zfloatnumbernumber
atTopBOOLbooleanboolean
inWorldCoordsBOOLbooleanboolean

Returns

float JavaScript number, Lua number

Reference

Namespace
Entity ENTITY
In the game
float GET_ENTITY_HEIGHT(Entity entity, float X, float Y, float Z, BOOL atTop, BOOL inWorldCoords)
Hash
0x5A504562485944DD

Open in the interactive natives reference