EntityClient

getEntityHealth

GET_ENTITY_HEALTH0xEEF059FAD016D209

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

SignatureJavaScript
getEntityHealth(entity: Entity): number
SignatureLua
getEntityHealth(entity: Entity): integer

Usage

JavaScript
const result = getEntityHealth(entity);
Lua
local result = getEntityHealth(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns an integer value of entity's current health.

Example of range for ped:
- Player [0 to 200]
- Ped [100 to 200]
- Vehicle [0 to 1000]
- Object [0 to 1000]

Health is actually a float value but this native casts it to int.

Reference

Namespace
Entity ENTITY
In the game
int GET_ENTITY_HEALTH(Entity entity)
Hash
0xEEF059FAD016D209

Open in the interactive natives reference