# CFX::SET_PED_AMMO

- **Hash:** `0xBF90DF1A`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetPedAmmo`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_PED_AMMO

## Signature

```c
void SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo);
```

## Parameters

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

## Returns

`void`

## Description

*Source: Cfx.re native reference*

```
NativeDB Added Parameter 4: BOOL p3
```

**This is the server-side RPC native equivalent of the client native [SET_PED_AMMO](?\_0x14E56BC5B5DB6A19).**

## Usage

### Lua

```lua
SetPedAmmo(ped, weaponHash, ammo)

-- always available, by hash
Citizen.InvokeNative(0xbf90df1a, ped, weaponHash, ammo)
```

### JavaScript

```js
SetPedAmmo(ped, weaponHash, ammo);

// by hash
Citizen.invokeNative('0xbf90df1a', ped, weaponHash, ammo);
```

### C#

```csharp
Function.Call((Hash)0xbf90df1a, ped, weaponHash, ammo);
```

- 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` ``.

*Sources: Cfx.re native reference.*
