EntityClient

setEntityMaxHealth

SET_ENTITY_MAX_HEALTH0x166E7CF68597D8B5

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

SignatureJavaScript
setEntityMaxHealth(entity: Entity, value: number): void
SignatureLua
setEntityMaxHealth(entity: Entity, value: integer)

Usage

JavaScript
setEntityMaxHealth(entity, value);
Lua
setEntityMaxHealth(entity, value)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
valueintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

For instance: setEntityMaxHealth(playerPedId(), 200); // director_mode.c4: 67849

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_MAX_HEALTH(Entity entity, int value)
Hash
0x166E7CF68597D8B5

Open in the interactive natives reference