weapons.Register

From Garry's Mod
Jump to: navigation, search
 weapons.Register( )

Description

Used to register your SWEP with the engine.

BUG

Sub-tables provided in the first argument will not carry over their metatable, and will receive a BaseClass key if the table was merged with the base's. Userdata references, which includes Vectors, Angles, Entities, etc. will not be copied.

Pull Request: #1300

Arguments

table swep_table

The SWEP table

Arguments

string classname

Classname to assign to that swep
Personal tools
Navigation