# WEAPON::GET_MAX_AMMO

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

## Signature

```c
BOOL GET_MAX_AMMO(Ped ped, int* ammo, Hash weaponHash);
```

## Parameters

- `ped` (`Ped`)
- `ammo` (`int*`)
- `weaponHash` (`Hash`)

## Returns

`BOOL`

## Usage

### Lua

```lua
local retval, ammo = GetMaxAmmo(ped, weaponHash)

-- always available, by hash
local retval, ammo = Citizen.InvokeNative(0xDC16122C7A20C933, ped, Citizen.PointerValueInt(), weaponHash, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, ammo] = GetMaxAmmo(ped, weaponHash);

// by hash
const [retval, ammo] = Citizen.invokeNative('0xDC16122C7A20C933', ped, Citizen.pointerValueInt(), weaponHash, Citizen.returnResultAnyway());
```

### C#

```csharp
var ammo = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xDC16122C7A20C933, ped, ammo, weaponHash);
// ammo.GetResult<int>()
```

- 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` ``.
- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

*Sources: alloc8or RDR3 NativeDB.*
