Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SWEP:SecondaryAttack()
- if( not self:CanPrimaryAttack() ) then
- return true;
- end
- vm = self.Owner:GetViewModel()
- self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
- self.Owner:ViewPunch(Angle(-2,0,0))
- if self:CanPrimaryAttack() and self.Owner:IsPlayer() then
- self.Weapon:EmitSound("pillar_energy_sword/fp_energy_sword_melee"..math.random(1,3)..".wav")
- if SERVER then
- if !self.Owner:KeyDown(IN_SPEED) and !self.Owner:KeyDown(IN_RELOAD) then
- timer.Create("hack-n-slash2", .23, 1, function() if not IsValid(self) then return end
- if IsValid(self.Owner) and
- IsValid(self.Weapon) then
- if self.Owner:Alive() and self.Owner:GetActiveWeapon():GetClass() == self.Gun then
- self:HackNSlash2() end end end)
- self.Owner:SetAnimation( PLAYER_ATTACK1 )
- self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement