if (SERVER) then AddCSLuaFile( "shared.lua" ) resource.AddFile( "icon_terrorabound_m14.vmt" ) resource.AddFile( "icon_terrorabound_m14.vtf" ) resource.AddFile( "models/Weapons/v_rif_m144.mdl" ) resource.AddFile( "models/Weapons/w_rif_m144.mdl" ) resource.AddFile( "materials/models/weapons/w_models/G36C/EOTech.vmt" ) resource.AddFile( "materials/models/weapons/w_models/G36C/Fore.vmt" ) resource.AddFile( "materials/models/weapons/w_models/G36C/Glass.vmt" ) resource.AddFile( "materials/models/weapons/w_models/G36C/Rail.vmt" ) resource.AddFile( "materials/models/weapons/w_models/G36C/Reciever2.vmt" ) resource.AddFile( "materials/models/weapons/w_models/G36C/Stock.vmt" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh1.vmt" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh1.vtf" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh1_ref.vtf" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh2.vmt" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh2.vtf" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh2_ref.vtf" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh3.vmt" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh3.vtf" ) resource.AddFile( "materials/models/weapons/v_models/rif_m144/m14_mesh3_ref.vtf" ) end if CLIENT then SWEP.PrintName = "M14" SWEP.Slot = 2 SWEP.ViewModelFOV = 72 SWEP.ViewModelFlip = false end SWEP.Base = "weapon_tttbase" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.HoldType = "ar2" SWEP.Primary.Delay = 0.3 SWEP.Primary.Recoil = 1.8 SWEP.Primary.Automatic = false SWEP.Primary.Damage = 27 SWEP.Primary.Cone = 0.020 SWEP.Primary.Ammo = "357" SWEP.Primary.ClipSize = 10 SWEP.Primary.ClipMax = 20 SWEP.Primary.DefaultClip = 10 SWEP.Primary.Sound = Sound( "Weapon_galil.single" ) SWEP.UseHands = true SWEP.ViewModelFlip = true SWEP.ViewModelFOV = 54 SWEP.ViewModel = Model("models/weapons/v_rif_m144.mdl") SWEP.WorldModel = Model("models/weapons/w_rif_m144.mdl") SWEP.Kind = WEAPON_HEAVY SWEP.HeadshotMultiplier = 2.6 SWEP.AutoSpawnable = true SWEP.AmmoEnt = "item_ammo_357_ttt" SWEP.CanBuy = {} SWEP.InLoadoutFor = nil SWEP.LimitedStock = false SWEP.AllowDrop = true SWEP.IsSilent = false SWEP.NoSights = false SWEP.IronSightsPos = Vector( 5.0, -9, 2.4 ) SWEP.IronSightsAng = Vector( 2.2, -0.1, 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(35, 0.5) else self.Owner:SetFOV(0, 0.2) end end 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 SWEP.Icon = "VGUI/ttt/icon_terrorabound_m14" SWEP.EquipMenuData = { type = "M14", desc = "Single_Shot" }; end