SWEP.OnDrop

From GMod Wiki

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