Garry's Mod Wiki

Player:GiveAmmo

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 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.

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 )

Page Links


Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 5
Generate Html 12
SaveChanges (1) 10
Render Body 0
Render Sidebar 18