SWEP.OnDrop

From GMod Wiki

Revision as of 02:13, 23 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnDrop
SyntaxSWEP:OnDrop( )
DescriptionCalled when the weapon has been dropped.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.OnDrop]SWEP.OnDrop [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionPrints the message "I like to drop stuff!" to the console whenever the weapon is dropped.
Used onNewerServer.png
Code
function SWEP:OnDrop()
	Msg("I like to drop stuff!")
end
Output"I like to drop stuff!"
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox