# WEAPON::GET_PED_AMMO_TYPE_FROM_WEAPON

- **Hash:** `0x7FEAD38B326B9F74`
- **Namespace:** WEAPON
- **Runtime name (Lua/JS):** `GetPedAmmoTypeFromWeapon`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/WEAPON/GET_PED_AMMO_TYPE_FROM_WEAPON

## Signature

```c
Hash GET_PED_AMMO_TYPE_FROM_WEAPON(Ped ped, Hash weaponHash);
```

## Parameters

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

## Returns

`Hash`

## Description

Returns the current ammo type of the specified ped's specified weapon.

## Usage

### Lua

```lua
local retval = GetPedAmmoTypeFromWeapon(ped, weaponHash)

-- always available, by hash
local retval = Citizen.InvokeNative(0x7FEAD38B326B9F74, ped, weaponHash, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetPedAmmoTypeFromWeapon(ped, weaponHash);

// by hash
const retval = Citizen.invokeNative('0x7FEAD38B326B9F74', ped, weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x7FEAD38B326B9F74, ped, weaponHash);
```

- 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: alloc8or RDR3 NativeDB.*
