Player.SelectWeapon

From GMod Wiki

Revision as of 17:38, 13 November 2009 by Dlaor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Player:SelectWeapon( String weapon_class_name )
Description:
Forces a player to select weapon defined in arguments
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.SelectWeapon]Player.SelectWeapon [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionForces every initializing player to select weapon_crowbar
Used onNewerServer.png
Code
 
function GM:PlayerInitialize( pl )
     pl:SelectWeapon( "weapon_crowbar" )
end
 
OutputPlayer's selected weapon is now weapon_crowbar


Additional Notes

RunConsoleCommand( "use", weapon_class_name )

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox