# Sandbox.BaseInventoryComponent.GiveAmmo

```csharp
int GiveAmmo(BaseAmmoResource type, int amount)
```

Add reserve ammo of the given type, clamped to the type's [Sandbox.BaseAmmoResource.MaxReserve](/api/Sandbox.BaseAmmoResource/MaxReserve).
Returns how much was actually added. Call this from host game logic (pickups) - it's
authoritative on the host.

### Parameters

- `type` (`BaseAmmoResource`)
- `amount` (`int`)

### Returns

`int`

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
