{"hash":"0x7B98500614C8E8B8","ns":"WEAPON","name":"_GET_BEST_PED_WEAPON_IN_INVENTORY","slug":"_GET_BEST_PED_WEAPON_IN_INVENTORY","official":false,"named":true,"luaName":"GetBestPedWeaponInInventory","game":"rdr3","apiset":"client","returnType":"Any","params":[{"name":"ped","type":"Ped"},{"name":"p1","type":"Any"},{"name":"guidPrimary","type":"Any*"}],"summary":"","descriptions":[],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1232","sources":["alloc8or"],"doc":1,"url":"https://natives.borderlinerp.com/natives/WEAPON/_GET_BEST_PED_WEAPON_IN_INVENTORY","markdownUrl":"https://natives.borderlinerp.com/natives/WEAPON/_GET_BEST_PED_WEAPON_IN_INVENTORY.md","snippets":{"lua":"local retval, guidPrimary = GetBestPedWeaponInInventory(ped, p1, guidPrimary)","luaInvoke":"local retval, guidPrimary = Citizen.InvokeNative(0x7B98500614C8E8B8, ped, p1, Citizen.PointerValueIntInitialized(guidPrimary), Citizen.ResultAsInteger())","js":"const [retval, guidPrimary] = GetBestPedWeaponInInventory(ped, p1, guidPrimary);","jsInvoke":"const [retval, guidPrimary] = Citizen.invokeNative('0x7B98500614C8E8B8', ped, p1, Citizen.pointerValueIntInitialized(guidPrimary), Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var guidPrimary = new OutputArgument();\nint retval = Function.Call<int>((Hash)0x7B98500614C8E8B8, ped, p1, guidPrimary);\n// guidPrimary.GetResult<int>()","notes":["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 `InvokeNative` with the hash — it always works."]}}