SWEP.GetCapabilities
From GMod Wiki
Revision as of 00:19, 24 October 2009 by Crazy Quebecer (Talk | contribs)
Event Hook | |
Hook Name | GetCapabilities |
Syntax | SWEP:GetCapabilities( ) |
Description | Called by NPC's every frame while holding this weapon. |
Returns | Enum Capabilities |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=SWEP.GetCapabilities]SWEP.GetCapabilities [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | As defined in "gamemodes\base\entities\weapons\weapon_base\init.lua" |
---|---|
Used on | |
Code | function SWEP:GetCapabilities() return CAP_WEAPON_RANGE_ATTACK1 | CAP_INNATE_RANGE_ATTACK1 end |
Output | N/A |
Additional Notes
- This apparently tells the NPC what kind of action the weapon can perform.
- Use this to tell NPCs what they can do with that weapon.