The Lab
WEAPON native

HAS_PED_GOT_WEAPON

returns BOOL4 paramsbuild 1207

Returns true if the ped has the weapon weaponHash.

Signature

C
BOOL HAS_PED_GOT_WEAPON(Ped ped, Hash weaponHash, int p2, BOOL onlyCheckPlayerInventory); // 0x8DECB02F88F428BC b1207

Parameters

#NameType
1pedPed
2weaponHashHash
3p2int
4onlyCheckPlayerInventoryBOOL

Facts

Facts about HAS_PED_GOT_WEAPON
Name
HAS_PED_GOT_WEAPON
Hash
0x8DECB02F88F428BC
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(0x8DECB02F88F428BC, -- HAS_PED_GOT_WEAPON
  PlayerPedId(), -- Ped ped
  GetHashKey("weapon_revolver_cattleman"), -- Hash weaponHash
  0, -- int p2
  false -- BOOL onlyCheckPlayerInventory
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0x8DECB02F88F428BC", // HAS_PED_GOT_WEAPON
  PlayerPedId(), // Ped ped
  GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
  0, // int p2
  false, // BOOL onlyCheckPlayerInventory
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x8DECB02F88F428BC, // HAS_PED_GOT_WEAPON
  API.PlayerPedId(), // Ped ped
  (uint)API.GetHashKey("weapon_revolver_cattleman"), // Hash weaponHash
  0, // int p2
  false // BOOL onlyCheckPlayerInventory
);
All WEAPON natives

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