SWEP.ShouldDropOnDie

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameShouldDropOnDie
SyntaxSWEP:ShouldDropOnDie( )
DescriptionShould weapon be dropped when player dies. Return true if it should, return false if it shouldn't.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.ShouldDropOnDie]SWEP.ShouldDropOnDie [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionMakes the weapon undroppable.
Used onNewerServer.png
Code
function SWEP:ShouldDropOnDie()
	return false
end
OutputNone
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox