Native referenceFiveM

GET_ENTITY_HEALTH

0xEEF059FAD016D209 ENTITY
FUNCTION SIGNATURE
int GET_ENTITY_HEALTH(Entity entity);
Property Value
Native Name GET_ENTITY_HEALTH
Hash 0xEEF059FAD016D209
Return Type int
Parameters entity (Entity)

Description: ``` 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. In order to get the actual value, do: float health = *(float *)(entityAddress + 0x280);

### Parameters
- **`entity`** (`Entity`) — The entity to get the health from.

### Examples
```lua
local health = GetEntityHealth(PlayerPedId())
print(health)
const health = GetEntityHealth(PlayerPedId());
console.log(`${health}`);
using static CitizenFX.Core.Native.API;
// ...
int health = GetEntityHealth(PlayerPedId());

// or the preferred use of C# wrapper
// Note: Returns 0-100 using this property.
int health = Game.PlayerPed.Health;

Debug.WriteLine($"{health}");
Back to ENTITY