The Lab
ENTITY native

_CHANGE_ENTITY_HEALTH

returns BOOL4 paramsbuild 1207

Changes the entity's health by amount, attributing the change to entity2 and weaponHash. Returns true on success.

Signature

C
BOOL _CHANGE_ENTITY_HEALTH(Entity entity, float amount, Entity entity2, Hash weaponHash); // 0x835F131E7DC8F97A b1207

Parameters

#NameType
1entityEntity
2amountfloat
3entity2Entity
4weaponHashHash

Facts

Facts about _CHANGE_ENTITY_HEALTH
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.

Lua
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
JavaScript
// 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) {
  // ...
}
C#
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
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.