_CHANGE_ENTITY_HEALTH
Changes the entity's health by amount, attributing the change to entity2 and weaponHash. Returns true on success.
Signature
BOOL _CHANGE_ENTITY_HEALTH(Entity entity, float amount, Entity entity2, Hash weaponHash); // 0x835F131E7DC8F97A b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | amount | float |
| 3 | entity2 | Entity |
| 4 | weaponHash | Hash |
Facts
| Name | _CHANGE_ENTITY_HEALTH |
|---|---|
| Hash | 0x835F131E7DC8F97A |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x835F131E7DC8F97A, -- _CHANGE_ENTITY_HEALTH
PlayerPedId(), -- Entity entity
0.0, -- float amount
PlayerPedId(), -- Entity entity2
GetHashKey("weapon_revolver_cattleman") -- Hash weaponHash
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x835F131E7DC8F97A", // _CHANGE_ENTITY_HEALTH
PlayerPedId(), // Entity entity
0.0, // float amount
PlayerPedId(), // Entity entity2
GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x835F131E7DC8F97A, // _CHANGE_ENTITY_HEALTH
API.PlayerPedId(), // Entity entity
0.0f, // float amount
API.PlayerPedId(), // Entity entity2
(uint)API.GetHashKey("weapon_revolver_cattleman") // Hash weaponHash
);Related ENTITY natives
- _GET_ENTITY_HEALTH_FLOAT
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
- GET_ENTITY_HEALTH
- GET_ENTITY_MAX_HEALTH
- HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT
- IS_ENTITY_A_MISSION_ENTITY
- IS_ENTITY_AT_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.