The Lab
WEAPON native

_HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON_RECENTLY

returns BOOL3 paramsbuild 1207

Returns true if the entity was damaged by the weapon within the last ms milliseconds.

Signature

C
BOOL _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON_RECENTLY(Entity entity, Hash weaponHash, int ms); // 0x9E2D5D6BC97A5F1E b1207

Parameters

#NameType
1entityEntity
2weaponHashHash
3msint

Facts

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

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