//General Variables\\
SWEP.AdminSpawnable = true
SWEP.ViewModelFOV = 64
SWEP.ViewModel = "models/weapons/v_crowbar.mdl"
SWEP.WorldModel = "models/weapons/v_crowbar.mdl"
SWEP.AutoSwitchTo = false
SWEP.Slot = 1
SWEP.HoldType = "Pistol"
SWEP.PrintName = "ShieldDistruction"
SWEP.Author = "Frog"
SWEP.Spawnable = true
SWEP.AutoSwitchFrom = false
SWEP.FiresUnderwater = true
SWEP.Weight = 5
SWEP.DrawCrosshair = true
SWEP.Category = "Stargate"
SWEP.SlotPos = 0
SWEP.DrawAmmo = false
SWEP.ReloadSound = "Weapon_Pistol.Reload"
SWEP.Instructions = "Shot at a Shield and Blow them Away | With Secondary the Damage go up!"
SWEP.Contact = "[email protected]"
SWEP.Purpose = "testing what this is xD"
SWEP.base = "weapon_base"
//General Variables\\
//Primary Fire Variables\\
SWEP.Primary.Sound = "Weapon_SniperRifle.Single"
SWEP.Primary.Damage = 10
SWEP.Primary.TakeAmmo = 0
SWEP.Primary.ClipSize = 9999
SWEP.Primary.Ammo = "gauss"
SWEP.Primary.DefaultClip = 1
SWEP.Primary.Spread = 0.0
SWEP.Primary.NumberofShots = 10
SWEP.Primary.Automatic = true
SWEP.Primary.Recoil = 0
SWEP.Primary.Delay = 1
SWEP.Primary.Force = 10
//Primary Fire Variables\\
//Secondary Fire Variables\\
SWEP.Secondary.Sound = "Weapon_StunStick.Swing"
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "gauss"
SWEP.Secondary.Recoil = 0
SWEP.Secondary.Delay = 1
SWEP.Secondary.TakeAmmo = 0
SWEP.Secondary.ClipSize = 1
//Secondary Fire Variables\\
//SWEP:Initialize()\\
function SWEP:Initialize()
util.PrecacheSound(self.Primary.Sound)
util.PrecacheSound(self.Secondary.Sound)
if ( SERVER ) then
self:SetWeaponHoldType( self.HoldType )
end
end
//SWEP:Initialize()\\
//SWEP:PrimaryFire()\\
function SWEP:PrimaryAttack()
if ( !self:CanPrimaryAttack() ) then return end
local bullet = {}
bullet.Num = self.Primary.NumberofShots
bullet.Src = self.Owner:GetShootPos()
bullet.Dir = self.Owner:GetAimVector()
bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0)
bullet.Tracer = 0
bullet.Force = self.Primary.Force
bullet.Damage = self.Primary.Damage
bullet.AmmoType = self.Primary.Ammo
self:ShootEffects()
self.Owner:FireBullets( bullet )
self.Weapon:EmitSound(Sound(self.Primary.Sound))
self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) )
self:TakePrimaryAmmo(self.Primary.TakeAmmo)
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
self.Weapon:SetNextSecondaryFire( CurTime() + self.Primary.Delay )
end
//SWEP:PrimaryFire()\\
//SWEP:SecondaryFire()\\
if self.Secondary.NextFire > CurTime() then
return end
self.Secondary.NextFire = CurTime() + self.Secondary.Delay
if SWEP.Primary.Force == 10 then
SWEP.Primary.Force = 250
elseif SWEP.Primary.Force == 250 then
SWEP.Primary.Force = 1000
else
SWEP.Primary.Force = 10
end
if SWEP.Primary.Damage == 10 then
SWEP.Primary.Damage = 250
elseif SWEP.Primary.Damage == 250 then
SWEP.Primary.Damage = 1000
else
SSWEP.Primary.Damage = 10
end
end
//SWEP:SecondaryFire()\\