rendered paste bodyif (SERVER) then AddCSLuaFile( "shared.lua" ) SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = falseendif ( CLIENT ) then SWEP.PrintName = "Paintball Gun" SWEP.DrawAmmo = false SWEP.DrawCrosshair = false SWEP.ViewModelFOV = 70 SWEP.ViewModelFlip = false SWEP.CSMuzzleFlashes = falseendSWEP.Author = "Panda X and TheDeuceBox"SWEP.Contact = "thepanda@impulse55.net" SWEP.Spawnable = trueSWEP.AdminSpawnable = true SWEP.ViewModel = "models/paintball/weapons/v_angel/v_angel.mdl" //"models/weapons/v_smg_tmp.mdl"SWEP.WorldModel = "models/paintball/weapons/w_angel/w_angel.mdl"SWEP.Primary.Sound = "weapons/sounds/pistol_empty.wav"SWEP.Primary.ClipSize = 200SWEP.Primary.DefaultClip = 400SWEP.Primary.Automatic = falseSWEP.Primary.Ammo = "pistol"SWEP.Primary.Delay = 0.2SWEP.Primary.Recoil = 0.2SWEP.Secondary.ClipSize = 0SWEP.Secondary.DefaultClip = 0SWEP.Secondary.Automatic = falseSWEP.Secondary.Ammo = "none"function SWEP:Reload() endfunction SWEP:Think() endlocal align = Vector( 7, 5, -5 )function SWEP:Precache() util.PrecacheSound(self.Primary.Sound) util.PrecacheModel("models/paintball/paintball.mdl")end function SWEP:PrimaryAttack(data) self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) //self.BaseClass.ShootEffects (self) self.Weapon:EmitSound("Weapon_Pistol.Empty") self.Weapon:SetNextPrimaryFire( CurTime() + 0.03 ) self:TakePrimaryAmmo(1) if ( !self:CanPrimaryAttack() ) then return end if CLIENT then return end //self.Weapon:SetNextPrimaryFire( CurTime() + 0.2 ) local pb = ents.Create("paintball") if pb:IsValid() then local v = self.Owner:GetShootPos() v = v + self.Owner:GetForward() * 5 v = v + self.Owner:GetRight() * 7.5 v = v + self.Owner:GetUp() * -2.5 pb:SetPos(v) pb:SetOwner(self.Owner) pb:Spawn() pb:Fire("kill", "", 10) local physobj = pb:GetPhysicsObject() if physobj:IsValid() then physobj:Wake() physobj:ApplyForceCenter(self.Owner:EyeAngles():Forward() * 100000) //physobj:SetMass(5) end endend //Reload Functionfunction SWEP:Reload() self.Weapon:DefaultReload( ACT_VM_RELOAD );endfunction SWEP:TakePrimaryAmmo( num ) // Doesn't use clips if ( self.Weapon:Clip1() <= 0 ) then if ( self:Ammo1() <= 0 ) then return end self.Owner:RemoveAmmo( num, self.Weapon:GetPrimaryAmmoType() ) return end self.Weapon:SetClip1( self.Weapon:Clip1() - num ) endfunction SWEP:Ammo1() return self.Owner:GetAmmoCount( self.Weapon:GetPrimaryAmmoType() )endfunction SWEP:CanPrimaryAttack() if ( self.Weapon:Clip1() < 0 ) then self.Weapon:EmitSound( "Weapon_Pistol.Empty" ) self.Weapon:SetNextPrimaryFire( CurTime() + 2.0 ) return false end return trueend