# Sandbox.BaseInventoryComponent.GetAmmo

```csharp
int GetAmmo(BaseAmmoResource type)
```

How much reserve ammo of the given type this inventory holds. Null is 0.

### Parameters

- `type` (`BaseAmmoResource`)

### Returns

`int`

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
