SWEP.Equip

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameEquip
SyntaxSWEP:Equip( Player NewOwner )
DescriptionCalled when the weapon has been acquired.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.Equip]SWEP.Equip [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Example

DescriptionKills anyone who picks up the SWEP.
Used onNewerServer.png
Code
function SWEP:Equip( NewOwner )
    NewOwner:Kill()
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox