Garry's Mod Wiki

Garry's Mod Wiki

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

Description

Gives ammo to a player

Arguments

1 number amount
Amount of ammo
2 string or number 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 )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...