RedM Natives

HAS_PED_GOT_WEAPON

Hash0x8DECB02F88F428BC
Runtime nameHasPedGotWeapon
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8DECB02F88F428BC

Signature

BOOL HAS_PED_GOT_WEAPON(Ped ped, Hash weaponHash, int p2, BOOL onlyCheckPlayerInventory);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—
p2int—
onlyCheckPlayerInventoryBOOL—

Returns BOOL

Description

onlyCheckPlayerInventory: If true, it will only check the players current inventory. If false, it also checks your horse inventory

Usage

Lua
local retval = HasPedGotWeapon(ped, weaponHash, p2, onlyCheckPlayerInventory)

-- always works, by hash
local retval = Citizen.InvokeNative(0x8DECB02F88F428BC, ped, weaponHash, p2, onlyCheckPlayerInventory, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = HasPedGotWeapon(ped, weaponHash, p2, onlyCheckPlayerInventory);

// by hash
const retval = Citizen.invokeNative('0x8DECB02F88F428BC', ped, weaponHash, p2, onlyCheckPlayerInventory, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x8DECB02F88F428BC, ped, weaponHash, p2, onlyCheckPlayerInventory);
  • 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`.

Sources

alloc8or RDR3 NativeDB

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