Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile()
- end
- SWEP.HoldType = "ar2"
- if CLIENT then
- SWEP.PrintName = "KRISS Vector"
- SWEP.Slot = 2
- end
- SWEP.Base = "weapon_tttbase"
- SWEP.Kind = WEAPON_HEAVY
- SWEP.Primary.Delay = 0.07
- SWEP.Primary.Recoil = 0.2
- SWEP.Primary.Automatic = true
- SWEP.Primary.Ammo = "Pistol"
- SWEP.Primary.Damage = 12
- SWEP.Primary.Cone = 0.035
- SWEP.Primary.ClipSize = 30
- SWEP.Primary.ClipMax = 60
- SWEP.Primary.DefaultClip = 30
- SWEP.AutoSpawnable = true
- SWEP.AmmoEnt = "item_ammo_pistol_ttt"
- SWEP.UseHands = true
- SWEP.ViewModelFlip = true
- SWEP.ViewModelFOV = 70
- SWEP.ViewModel = "models/weapons/kriss/v_kriss_svs.mdl"
- SWEP.WorldModel = "models/weapons/kriss/w_kriss_vector.mdl"
- SWEP.Primary.Sound = Sound( "kriss_vector.Single" )
- SWEP.IronSightsPos = Vector(3.943, -0.129, 1.677)
- SWEP.IronSightsAng = Vector(-1.922, 0.481, 0)
- function SWEP:SetZoom(state)
- if CLIENT then return end
- if not (IsValid(self.Owner) and self.Owner:IsPlayer()) then return end
- if state then
- self.Owner:SetFOV(50, 0.3)
- else
- self.Owner:SetFOV(0, 0.2)
- end
- end
- -- Add some zoom to ironsights for this gun
- function SWEP:SecondaryAttack()
- if not self.IronSightsPos then return end
- if self.Weapon:GetNextSecondaryFire() > CurTime() then return end
- bIronsights = not self:GetIronsights()
- self:SetIronsights( bIronsights )
- if SERVER then
- self:SetZoom(bIronsights)
- end
- self.Weapon:SetNextSecondaryFire(CurTime() + 0.3)
- end
- function SWEP:PreDrop()
- self:SetZoom(false)
- self:SetIronsights(false)
- return self.BaseClass.PreDrop(self)
- end
- function SWEP:Reload()
- self.Weapon:DefaultReload( ACT_VM_RELOAD );
- self:SetIronsights( false )
- self:SetZoom(false)
- end
- function SWEP:Holster()
- self:SetIronsights(false)
- self:SetZoom(false)
- return true
- end
- if CLIENT then
- function SWEP:DrawHUD()
- if not self:GetIronsights() or GetConVar("ttt_ironsights_lowered"):GetBool() then
- return self.BaseClass.DrawHUD(self)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement