RedM Natives

_IS_PED_HOLDING_WEAPON

Weapon must currently be held/equipped by the ped.

Hash0x07E1C35F0078C3F9
Runtime nameIsPedHoldingWeapon
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _IS_PED_HOLDING_WEAPON(Ped ped, Hash weapon);

Parameters

NameTypeDescription
pedPed—
weaponHash—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Seems to return true if the passed weapon is some sort of non-lethal melee weapon.
Weapon must currently be held/equipped by the ped.

VORPCORE RDR3natives

Returns whether the specified ped is holding a weapon with the given hash.
only these weapons below return true
WEAPON_BOW, WEAPON_KIT_METAL_DETECTOR, WEAPON_MELEE_CLEAVER, WEAPON_MELEE_DAVY_LANTERN, WEAPON_MELEE_HATCHET, WEAPON_MELEE_HATCHET_HUNTER, WEAPON_MELEE_KNIFE_JAWBONE, WEAPON_MELEE_LANTERN WEAPON_MELEE_TORCH, WEAPON_MOONSHINEJUG_MP, WEAPON_RIFLE_BOLTACTION, WEAPON_SHOTGUN_PUMP, WEAPON_THROWN_BOLAS, WEAPON_THROWN_MOLOTOV

Usage

Lua
local retval = IsPedHoldingWeapon(ped, weapon)

-- always works, by hash
local retval = Citizen.InvokeNative(0x07E1C35F0078C3F9, ped, weapon, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsPedHoldingWeapon(ped, weapon);

// by hash
const retval = Citizen.invokeNative('0x07E1C35F0078C3F9', ped, weapon, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x07E1C35F0078C3F9, ped, weapon);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.