Player.HasWeapon
From GMod Wiki
Revision as of 19:14, 2 November 2009 by Crazy Quebecer (Talk | contribs)
Function | |
Syntax | Player:HasWeapon( String WeaponClass ) |
Description: | |
Returns true if player has the weapon, otherwise false | |
Returns: | Boolean |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.HasWeapon]Player.HasWeapon [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Print true if the player 1 has the weapon weapon_rpg |
---|---|
Used on | |
Code | pl=player.GetByID(1) print( tostring( pl:HasWeapon("weapon_rpg") ) ) |
Output | True or false |