# WEAPON::GET_BEST_PED_WEAPON

- **Hash:** `0x8483E98E8B888AE2`
- **Namespace:** WEAPON
- **Runtime name (Lua/JS):** `GetBestPedWeapon`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/WEAPON/GET_BEST_PED_WEAPON

## Signature

```c
Hash GET_BEST_PED_WEAPON(Ped ped, BOOL p1, BOOL p2);
```

## Parameters

- `ped` (`Ped`)
- `p1` (`BOOL`)
- `p2` (`BOOL`)

## Returns

`Hash`

## Usage

### Lua

```lua
local retval = GetBestPedWeapon(ped, p1, p2)

-- always available, by hash
local retval = Citizen.InvokeNative(0x8483E98E8B888AE2, ped, p1, p2, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetBestPedWeapon(ped, p1, p2);

// by hash
const retval = Citizen.invokeNative('0x8483E98E8B888AE2', ped, p1, p2, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x8483E98E8B888AE2, ped, p1, p2);
```

*Sources: alloc8or RDR3 NativeDB.*
