weapons.GetList
From GMod Wiki
Revision as of 22:56, 17 November 2011 by TheFreeman193 (Talk | contribs)
Function | |
Syntax |
weapons.GetList( ) Where is this used? |
Description: | |
Retrieves a copy of all of the weapons available on the server. | |
Returns: | Table :Weapon |
Part of Library: | Weapons |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Weapons.GetList]Weapons.GetList [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Prints all variables you can call of specified weapon. |
---|---|
Used on | |
Code | for k,v in pairs( weapons.GetList()[ 1 ] ) do print( k ) end |
Output | prints all variables of the weapon in slot 1. |
Description | Prints all names of sweps on the server. |
---|---|
Used on | |
Code | for k,v in pairs( weapons.GetList() ) do print( v.PrintName ) end |
Output | prints all weapon names. |
Additional notes
- You get varied results when called from client/server.