EntityClient

getEntityMaxHealth

GET_ENTITY_MAX_HEALTH0x15D757606D170C3C

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

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

Usage

JavaScript
const result = getEntityMaxHealth(entity);
Lua
local result = getEntityMaxHealth(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.

Return an integer value of entity's maximum health.

Example:
- Player = 200
- Ped = 150

Reference

Namespace
Entity ENTITY
In the game
int GET_ENTITY_MAX_HEALTH(Entity entity)
Hash
0x15D757606D170C3C

Open in the interactive natives reference