Garry's Mod Wiki

weapons.Get

  table weapons.Get( string classname )

Description

Get a copy of weapon table by name. This function also inherits fields from the weapon's base class, unlike weapons.GetStored.

This will only work on SWEP's, this means that this will not return anything for HL2/HL:S weapons.

Arguments

1 string classname
Class name of weapon to retrieve

Returns

1 table
The retrieved table or nil