GET_ENTITY_HEALTH
Only works for vehicle and peds
Signature
int GET_ENTITY_HEALTH(Entity entity);Parameters
| Name | Type | Description |
|---|---|---|
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
Only works for vehicle and peds
Usage
local retval = GetEntityHealth(entity)
-- always works, by hash
local retval = Citizen.InvokeNative(0x8e3222b7, entity, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetEntityHealth(entity);
// by hash
const retval = Citizen.invokeNative('0x8e3222b7', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x8e3222b7, entity);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.