Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SWEP.PrintName = "Wand" -- The name of the weapon
- SWEP.Author = "Liza"
- SWEP.Purpose = "make people uncomfortable while you caress them with death"
- SWEP.Instructions = "left click to fire single round right click to fire semi auto shotgun"
- SWEP.Category = "Liza's Sweps" --This is required or else your weapon will be placed under "Other"
- SWEP.Spawnable= true --Must be true
- SWEP.AdminOnly = false
- SWEP.Base = "weapon_base"
- local ShootSound = Sound("Weapon_Pistol.Single")
- SWEP.Primary.Damage = 200 --The amount of damage will the weapon do
- SWEP.Primary.TakeAmmo = 1 -- How much ammo will be taken per shot
- SWEP.Primary.ClipSize = 50 -- How much bullets are in the mag
- SWEP.Primary.Ammo = "SniperRound" --The ammo type will it use
- SWEP.Primary.DefaultClip = 100 -- How much bullets preloaded when spawned
- SWEP.Primary.Spread = 0.0 -- The spread when shot
- SWEP.Primary.NumberofShots = 5 -- Number of bullets when shot
- SWEP.Primary.Automatic = true -- Is it automatic
- SWEP.Primary.Recoil = 0.0 -- The amount of recoil
- SWEP.Primary.Delay = 0.0 -- Delay before the next shot
- SWEP.Primary.Force = 10000
- SWEP.Secondary.ClipSize = -1
- SWEP.Secondary.DefaultClip = -1
- SWEP.Secondary.Automatic = false
- SWEP.Secondary.Ammo = "none"
- SWEP.Slot = 1
- SWEP.SlotPos = 1
- SWEP.DrawCrosshair = true --Does it draw the crosshair
- SWEP.DrawAmmo = true
- SWEP.Weight = 1 --Priority when the weapon your currently holding drops
- SWEP.AutoSwitchTo = false
- SWEP.AutoSwitchFrom = false
- SWEP.ViewModelFlip = false
- SWEP.ViewModelFOV = 60
- SWEP.ViewModel = "none"
- SWEP.WorldModel = "none"
- SWEP.UseHands = true
- SWEP.HoldType = "magic"
- SWEP.FiresUnderwater = true
- SWEP.ReloadSound = "sound/epicreload.wav"
- SWEP.CSMuzzleFlashes = false
- function SWEP:Initialize()
- util.PrecacheSound(ShootSound)
- util.PrecacheSound(self.ReloadSound)
- self:SetWeaponHoldType( self.HoldType )
- end
- 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 = 1
- bullet.Force = self.Primary.Force
- bullet.Damage = self.Primary.Damage
- bullet.AmmoType = self.Primary.Ammo
- local rnda = self.Primary.Recoil * -1
- local rndb = self.Primary.Recoil * math.random(-1,1)
- self:ShootEffects()
- self.Owner:FireBullets( bullet )
- self:EmitSound(ShootSound)
- self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) )
- self:TakePrimaryAmmo(self.Primary.TakeAmmo)
- self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
- end
- function SWEP:SecondaryAttack()
- end
- function SWEP:Reload()
- self:EmitSound(Sound(self.ReloadSound))
- self.Weapon:DefaultReload( ACT_VM_RELOAD );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement