Player.HasWeapon
From GMod Wiki
| 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 |