Garry's Mod Wiki

Player:GiveAmmo

  number Player:GiveAmmo( number amount, any type, boolean hidePopup = false )

Description

Gives ammo to a player

Arguments

1 number amount
Amount of ammo
2 any type
Type of ammo. This is a string for named ammo types, and a number for ammo ID.

You can find a list of default ammo types here.

3 boolean hidePopup = false
Hide display popup when giving the ammo

Returns

1 number
Ammo given.

Example

Give the player 200 rounds for the pistol, hiding the popup.

Entity( 1 ):GiveAmmo( 200, "Pistol", true )