// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // ::: Base script generated by ESFS GMOD SWEP Script Generator ::: // ::: Coded by Exile of ESFS ::: // ::: http://forum.esfservers.com | http://exile-studios.com ::: // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // ::: Generator url: http://exile-studios.com/swep.php ::: // :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // :::::::::::::::::::::::: // ::: General Settings ::: // :::::::::::::::::::::::: SWEP.PrintName = "NigLyncher" SWEP.Author = "DropBear!" SWEP.Instructions = "shoot the nig to lynch him!" SWEP.Contact = "through steam or FS forum" SWEP.Purpose = "yes" SWEP.AdminSpawnable = true SWEP.Spawnable = false SWEP.ViewModelFOV = 64 SWEP.ViewModel = "models/weapons/v_.mdl" SWEP.WorldModel = "models/weapons/w_.mdl" SWEP.AutoSwitchTo = true SWEP.AutoSwitchFrom = false SWEP.Slot = 4 SWEP.SlotPos = 1 SWEP.HoldType = "pistol" SWEP.FiresUnderwater = true SWEP.Weight = 5 SWEP.DrawCrosshair = true SWEP.Category = "Primary" SWEP.DrawAmmo = true SWEP.ReloadSound = "" SWEP.base = "weapon_base" // ::::::::::::::::::::::::::::::: // ::: Primary Attack Settings ::: // ::::::::::::::::::::::::::::::: SWEP.Primary.Sound = "" SWEP.Primary.Damage = 4000 SWEP.Primary.TakeAmmo = 1 SWEP.Primary.ClipSize = 50 SWEP.Primary.Ammo = "HelicopterGun." SWEP.Primary.DefaultClip = 400 SWEP.Primary.Spread = 0.1 SWEP.Primary.NumberofShots = 1 SWEP.Primary.Automatic = true SWEP.Primary.Recoil = 1 SWEP.Primary.Delay = 1 SWEP.Primary.Force = 1000 // :::::::::::::::::: // ::: Initialize ::: // :::::::::::::::::: function SWEP:Initialize() //Tells the script what to do when the player "Initializes" the SWEP. util.PrecacheSound(self.Primary.Sound) util.PrecacheSound(self.Secondary.Sound) self:SetWeaponHoldType( self.HoldType ) end // :::::::::::::::::::::: // ::: Primary Attack ::: // :::::::::::::::::::::: function SWEP:PrimaryAttack() if ( !self:CanPrimaryAttack() ) then return end local bullet = {} bullet.Num = self.Primary.NumberofShots //The number of shots fired bullet.Src = self.Owner:GetShootPos() //Gets where the bullet comes from bullet.Dir = self.Owner:GetAimVector() //Gets where youre aiming bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0) //The above, sets how far the bullets spread from each other. bullet.Tracer = 0 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(Sound(self.Primary.Sound)) self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) ) self:TakePrimaryAmmo(self.Primary.TakeAmmo) self:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) self:SetNextSecondaryFire( CurTime() + self.Primary.Delay ) end