# CFX::GET_ENTITY_HEALTH

- **Hash:** `0x8E3222B7`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetEntityHealth`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_ENTITY_HEALTH

## Signature

```c
int GET_ENTITY_HEALTH(Entity entity);
```

## Parameters

- `entity` (`Entity`) — The entity to check the health of

## Returns

`int` — If the entity is a vehicle it will return 0-1000
If the entity is a ped it will return 0-200
If the entity is an object it will return 0

## Description

*Source: Cfx.re native reference*

Only works for vehicle and peds

## Usage

### Lua

```lua
local retval = GetEntityHealth(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0x8e3222b7, entity, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetEntityHealth(entity);

// by hash
const retval = Citizen.invokeNative('0x8e3222b7', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x8e3222b7, entity);
```

*Sources: Cfx.re native reference.*
