SWEP.EquipAmmo
From GMod Wiki
| Event Hook | |
| Hook Name | EquipAmmo |
| Syntax | SWEP:EquipAmmo( Player NewOwner ) |
| Description | Called when the NewOwner already has this weapon and instead gives only ammunition. |
| Returns | Nil |
| Lua State | |
| BBCode | [b][url=wiki.garrysmod.com/?title=SWEP.EquipAmmo]SWEP.EquipAmmo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Give the owner health when ammo is picked up. |
|---|---|
| Used on | |
| Code | function SWEP:EquipAmmo( NewOwner ) NewOwner:SetHealth(NewOwner:Health()+5) end |
| Output | N/A |