_GET_BEST_PED_WEAPON_IN_GROUP
If near your horse when called, weapons stored on your horse will be considered Returns weaponHash
Hash
0x9F67929D98E7C6E8Runtime name
GetBestPedWeaponInGroupNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Hash _GET_BEST_PED_WEAPON_IN_GROUP(Ped ped, Hash weaponGroup, BOOL p2, BOOL p3);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponGroup | Hash | — |
p2 | BOOL | — |
p3 | BOOL | — |
Returns Hash
Description
If near your horse when called, weapons stored on your horse will be considered
Returns weaponHash
Usage
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#
const retval = GetBestPedWeaponInGroup(ped, weaponGroup, p2, p3);
// by hash
const retval = Citizen.invokeNative('0x9F67929D98E7C6E8', ped, weaponGroup, p2, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.