Entity/IsWeapon

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Func |Name=IsWeapon |Parent=Entity |Description=Checks if the entity is a weapon or not. | Returns = {{Return| boolean| isWeapon}} |Realm=Shared |IsClass=Yes }} {{Ret...")
 
 
Line 3: Line 3:
 
|Parent=Entity
 
|Parent=Entity
 
|Description=Checks if the entity is a weapon or not.
 
|Description=Checks if the entity is a weapon or not.
| Returns = {{Return| boolean| isWeapon}}
 
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
Line 9: Line 8:
 
{{Ret
 
{{Ret
 
|type=boolean
 
|type=boolean
|desc= isWeapon
+
|desc=Whether the entity is a weapon
}}
+
{{Example
+
| Description = Demonstrates the use of this function.
+
| Code = print( ents.FindByClass("weapon_*")[1]:IsWeapon() )
+
| Output = Will print true if entity is found, error otherwise.
+
 
}}
 
}}

Latest revision as of 12:20, 17 April 2014

 Entity:IsWeapon( )

Description

Checks if the entity is a weapon or not.

Returns

boolean

Whether the entity is a weapon
Personal tools
Navigation