Garry's Mod Wiki

Revision Difference

weapons.GetList#512212

<function name="GetList" parent="weapons" type="libraryfunc">⤶ <description>Get a list of all the registered SWEPs. This does not include weapons added to spawnmenu manually.</description>⤶ <realm>Shared</realm>⤶ <rets>⤶ <ret name="" type="table">List of all the registered SWEPs</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Example structure.</description>⤶ <code>PrintTable( weapons.GetList() )</code>⤶ <output>⤶ ⤶ ```⤶ 1:⤶ Folder = weapons/weapon_myweapon⤶ ClassName = weapon_myweapon⤶ -- The rest of the SWEP table⤶ 2:⤶ Folder = weapons/weapon_myweapon2⤶ ClassName = weapon_myweapon2⤶ -- The rest of the SWEP table⤶ ```⤶ ⤶ </output>⤶ ⤶ </example>