SET_ENTITY_HEALTH
Sets the entity's health.
Hash
0xAC2767ED8BDFAB15Runtime name
SetEntityHealthNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
Signature
void SET_ENTITY_HEALTH(Entity entity, int healthAmount, Entity entityKilledBy);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
healthAmount | int | — |
entityKilledBy | Entity | — |
Returns void
Description
Sets the entity's health. healthAmount sets the health value to that, and sets the maximum health core value. Setting healthAmount to 0 will kill the entity. entityKilledBy parameter can also be 0
Usage
SetEntityHealth(entity, healthAmount, entityKilledBy)
-- always works, by hash
Citizen.InvokeNative(0xAC2767ED8BDFAB15, entity, healthAmount, entityKilledBy)JavaScript and C#
SetEntityHealth(entity, healthAmount, entityKilledBy);
// by hash
Citizen.invokeNative('0xAC2767ED8BDFAB15', entity, healthAmount, entityKilledBy);Function.Call((Hash)0xAC2767ED8BDFAB15, entity, healthAmount, entityKilledBy);See also
GET_ENTITY_HEALTH_CHANGE_ENTITY_HEALTHAlters entity's health by 'amount'.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.