SWEP.GetCapabilities

From GMod Wiki

Revision as of 00:19, 24 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameGetCapabilities
SyntaxSWEP:GetCapabilities( )
DescriptionCalled by NPC's every frame while holding this weapon.
ReturnsEnum Capabilities
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.GetCapabilities]SWEP.GetCapabilities [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Example

DescriptionAs defined in "gamemodes\base\entities\weapons\weapon_base\init.lua"
Used onNewerServer.png
Code
function SWEP:GetCapabilities()
 
	return CAP_WEAPON_RANGE_ATTACK1 | CAP_INNATE_RANGE_ATTACK1
 
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox