The Lab
WEAPON native

_GET_BEST_PED_WEAPON_IN_GROUP

returns Hash4 paramsbuild 1207

Returns the best weapon the ped has within the weapon group weaponGroup.

Signature

C
Hash _GET_BEST_PED_WEAPON_IN_GROUP(Ped ped, Hash weaponGroup, BOOL p2, BOOL p3); // 0x9F67929D98E7C6E8 b1207

Parameters

#NameType
1pedPed
2weaponGroupHash
3p2BOOL
4p3BOOL

Facts

Facts about _GET_BEST_PED_WEAPON_IN_GROUP
Name
_GET_BEST_PED_WEAPON_IN_GROUP
Hash
0x9F67929D98E7C6E8
Namespace
Returns
Hash
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local hash = Citizen.InvokeNative(0x9F67929D98E7C6E8, -- _GET_BEST_PED_WEAPON_IN_GROUP
  PlayerPedId(), -- Ped ped
  GetHashKey("weapon_revolver_cattleman"), -- Hash weaponGroup
  false, -- BOOL p2
  false, -- BOOL p3
  Citizen.ResultAsInteger()
)
print(hash)
JavaScript
const hash = Citizen.invokeNative("0x9F67929D98E7C6E8", // _GET_BEST_PED_WEAPON_IN_GROUP
  PlayerPedId(), // Ped ped
  GetHashKey("weapon_revolver_cattleman"), // Hash weaponGroup
  false, // BOOL p2
  false, // BOOL p3
  Citizen.resultAsInteger()
);
console.log(hash)
C#
int hash = Function.Call<int>((Hash)0x9F67929D98E7C6E8, // _GET_BEST_PED_WEAPON_IN_GROUP
  API.PlayerPedId(), // Ped ped
  (uint)API.GetHashKey("weapon_revolver_cattleman"), // Hash weaponGroup
  false, // BOOL p2
  false // BOOL p3
);
All WEAPON natives

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