_HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON_RECENTLY
Returns true if the entity was damaged by the weapon within the last ms milliseconds.
Signature
BOOL _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON_RECENTLY(Entity entity, Hash weaponHash, int ms); // 0x9E2D5D6BC97A5F1E b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | weaponHash | Hash |
| 3 | ms | int |
Facts
| 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.
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
-- ...
endconst 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) {
// ...
}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
);Related WEAPON natives
- _HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON
- HAS_WEAPON_GOT_WEAPON_COMPONENT
- _HAS_PED_GOT_WEAPON_COMPONENT
- _HAS_WEAPON_ASSET_LOADED
- _GET_PLAYER_PED_QUICK_SWAP_WEAPON_BY_GUID
- _GET_WEAPON_FROM_DEFAULT_PED_WEAPON_COLLECTION
- _GET_WEAPON_GUN_SPINNING_WEAPON_EMOTE_TRICK_TYPE_HASH
- _GET_WEAPON_HAS_MULTIPLE_AMMO_TYPES
- _GIVE_WEAPON_COMPONENT_TO_ENTITY
- _GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT
- _REMOVE_WEAPON_FROM_PED_BY_GUID
- GET_CURRENT_PED_WEAPON_ENTITY_INDEX
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.