HAS_PED_GOT_WEAPON
Hash
0x8DECB02F88F428BCRuntime name
HasPedGotWeaponNamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x8DECB02F88F428BCSignature
BOOL HAS_PED_GOT_WEAPON(Ped ped, Hash weaponHash, int p2, BOOL onlyCheckPlayerInventory);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash | — |
p2 | int | — |
onlyCheckPlayerInventory | BOOL | — |
Returns BOOL
Description
onlyCheckPlayerInventory: If true, it will only check the players current inventory. If false, it also checks your horse inventory
Usage
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#
const retval = HasPedGotWeapon(ped, weaponHash, p2, onlyCheckPlayerInventory);
// by hash
const retval = Citizen.invokeNative('0x8DECB02F88F428BC', ped, weaponHash, p2, onlyCheckPlayerInventory, Citizen.returnResultAnyway());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.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.