Garry's Mod Wiki

game.AddAmmoType

game.AddAmmoType

game.AddAmmoType( table ammoData )

Description

Adds a new ammo type to the game.

You can find a list of default ammo types here.

This function must be called on both the client and server in GM:Initialize or you will have unexpected problems.
There is a limit of 256 ammo types, including the default ones.

Arguments

1 table ammoData
The attributes of the ammo. See the Structures/AmmoData.

Example

Add an ammo type.

game.AddAmmoType( { name = "ammo_9mm_max", dmgtype = DMG_BULLET, tracer = TRACER_LINE, plydmg = 0, npcdmg = 0, force = 2000, minsplash = 10, maxsplash = 5 } )

Special Pages


Wikis

?

Render Time: 61ms

DB GetPage 30
Generate Html 4
SaveChanges (1) 18
Render Body 0
Render Sidebar 6