Player/GiveAmmo

From Garry's Mod
Jump to: navigation, search
 Player:GiveAmmo( )

Contents

Description

Gives ammo to a player

Arguments

number amount

Amount of ammo

Arguments

string type

Type of ammo.

This can also be a number for ammo ID, useful for custom ammo types.

You can find a list of default ammo types here.

Arguments

boolean hidePopup=false

Hide display popup when giving the ammo

Returns

number

Ammo given.

Examples

Example

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

player.GetByID(1):GiveAmmo( 200, "Pistol", true )


Personal tools
Navigation