Zet0rz / nzombies

A GM13 Nazi Zombies style (WIP) gamemode
GNU General Public License v3.0
73 stars 79 forks source link

[QUESTION] Does Repap actually work? #672

Open sh4d0w59 opened 5 years ago

sh4d0w59 commented 5 years ago

Title. I've tried to set up repap code with some edited weapons but it's as if the gamemode doesn't recognize that my weapons are pack a punched. Anytime I repap, the pack a punch machine reruns the normal pap code.

Here's the code I'm using if it will be of any help:

-- PaP Function
function SWEP:OnPaP()
self.Ispackapunched = 1 -- With this set to "1", the pap camo code runs.
self.Primary.Damage = 100 -- Sets new damage after pap
self.Primary.ClipSize = 30 -- Sets magazine size
self.Primary.MaxAmmo = 270 -- Sets new max ammo
self.Primary.Automatic = true -- Sets wether the swep fire while the button is constantly held.
self.FireModes = { -- Used to set what firemodes are available on this weapon.
    "Auto"
}

self.MuzzleFlashEffect = "cso_muz_crm_hnt"

self:SetTFAAttachment(3, 2)
--[[local ammo_type = self:GetPrimaryAmmoType() or self.Primary.Ammo
    self.Owner:SetAmmo( self.Primary.MaxAmmo, ammo_type )]]--

self:ClearStatCache() -- Don't touch this.
return true
end

-- RePaP

SWEP.NZRePaPText = "boost damage"

function SWEP:OnRePaP()
    self.Primary.Damage = 100000
    self:ClearStatCache()
    print(repap!)
return true
end