Native referenceFiveM

SET_ENTITY_HEALTH

0x6B76DC1F3AE6E6A3 ENTITY
FUNCTION SIGNATURE
void SET_ENTITY_HEALTH(Entity entity, int health);
Property Value
Native Name SET_ENTITY_HEALTH
Hash 0x6B76DC1F3AE6E6A3
Return Type void
Parameters entity (Entity), health (int)

Description: When setting health for a player ped, the game will clamp the health value to ensure it does not exceed the maximum health. This maximum health can be retrieved by calling GET_PED_MAX_HEALTH. It can also be modified by calling SET_PED_MAX_HEALTH.

When setting the health for non-player peds or entities, the maximum health will be increased if the new health value exceeds the current maximum.

Default health for male peds is 200, for female peds it is 175.

Added parameters

  • inflictor: The handle for the entity that caused the damage.

Parameters

  • entity (Entity) — The entity handle.
  • health (int) — The health we should set this entity to.
Back to ENTITY