_GET_BEST_PED_WEAPON_IN_INVENTORY
Hash
0x7B98500614C8E8B8Runtime name
GetBestPedWeaponInInventoryNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1232
Signature
Any _GET_BEST_PED_WEAPON_IN_INVENTORY(Ped ped, Any p1, Any* guidPrimary);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
p1 | Any | — |
guidPrimary | Any* | — |
Returns Any
Usage
local retval, guidPrimary = GetBestPedWeaponInInventory(ped, p1, guidPrimary)
-- always works, by hash
local retval, guidPrimary = Citizen.InvokeNative(0x7B98500614C8E8B8, ped, p1, Citizen.PointerValueIntInitialized(guidPrimary), Citizen.ResultAsInteger())JavaScript and C#
const [retval, guidPrimary] = GetBestPedWeaponInInventory(ped, p1, guidPrimary);
// by hash
const [retval, guidPrimary] = Citizen.invokeNative('0x7B98500614C8E8B8', ped, p1, Citizen.pointerValueIntInitialized(guidPrimary), Citizen.returnResultAnyway(), Citizen.resultAsInteger());var guidPrimary = new OutputArgument();
int retval = Function.Call<int>((Hash)0x7B98500614C8E8B8, ped, p1, guidPrimary);
// guidPrimary.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.- 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.