weapons.Get

From GMod Wiki

Jump to: navigation, search
Function
Syntax weapons.Get( String class )
Where is this used?
Description:
Returns the table of the SWEP associated with the class
Returns: Table
Part of Library: Weapons
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapons.Get]Weapons.Get [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCheck to see if the server has the Ironsights Designer SWEP installed
Used onNewerShared.png
Code
if weapons.Get( "chair_thrower" ) then
	RunSomeFunctionHere( )
end
OutputWill call the function RunSomeFunction if the SWEP chair_thrower is registered.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox