SWEP.EquipAmmo

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameEquipAmmo
SyntaxSWEP:EquipAmmo( Player NewOwner )
DescriptionCalled when the NewOwner already has this weapon and instead gives only ammunition.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.EquipAmmo]SWEP.EquipAmmo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionGive the owner health when ammo is picked up.
Used onNewerServer.png
Code
function SWEP:EquipAmmo( NewOwner )
	NewOwner:SetHealth(NewOwner:Health()+5)
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox