The Lab
WEAPON native

_HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON

returns BOOL3 paramsbuild 1207

Returns true if the entity has been damaged by the given weapon or weapon type.

Signature

C
BOOL _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(Entity entity, Hash weaponName, int weaponType); // 0xDCF06D0CDFF68424 b1207

Parameters

#NameType
1entityEntity
2weaponNameHash
3weaponTypeint

Facts

Facts about _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
Name
_HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
Hash
0xDCF06D0CDFF68424
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(0xDCF06D0CDFF68424, -- _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
  PlayerPedId(), -- Entity entity
  GetHashKey("weapon_revolver_cattleman"), -- Hash weaponName
  0 -- int weaponType
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0xDCF06D0CDFF68424", // _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
  PlayerPedId(), // Entity entity
  GetHashKey("weapon_revolver_cattleman"), // Hash weaponName
  0, // int weaponType
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0xDCF06D0CDFF68424, // _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
  API.PlayerPedId(), // Entity entity
  (uint)API.GetHashKey("weapon_revolver_cattleman"), // Hash weaponName
  0 // int weaponType
);
All WEAPON natives

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