RedM Natives

_GET_BEST_PED_WEAPON_IN_GROUP

If near your horse when called, weapons stored on your horse will be considered Returns weaponHash

Hash0x9F67929D98E7C6E8
Runtime nameGetBestPedWeaponInGroup
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207

Signature

Hash _GET_BEST_PED_WEAPON_IN_GROUP(Ped ped, Hash weaponGroup, BOOL p2, BOOL p3);

Parameters

NameTypeDescription
pedPed—
weaponGroupHash—
p2BOOL—
p3BOOL—

Returns Hash

Description

If near your horse when called, weapons stored on your horse will be considered
Returns weaponHash

Usage

Lua
local retval = GetBestPedWeaponInGroup(ped, weaponGroup, p2, p3)

-- always works, by hash
local retval = Citizen.InvokeNative(0x9F67929D98E7C6E8, ped, weaponGroup, p2, p3, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetBestPedWeaponInGroup(ped, weaponGroup, p2, p3);

// by hash
const retval = Citizen.invokeNative('0x9F67929D98E7C6E8', ped, weaponGroup, p2, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x9F67929D98E7C6E8, ped, weaponGroup, p2, p3);
  • 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

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