# Sandbox.BaseInventoryComponent.TakeAmmo

```csharp
int TakeAmmo(BaseAmmoResource type, int amount)
```

Take up to `amount` reserve ammo of the given type, returning how much was
actually removed. The owning client spends locally and the spend is mirrored to the host,
whose pool is the truth.

### Parameters

- `type` (`BaseAmmoResource`)
- `amount` (`int`)

### Returns

`int`

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
