Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SWEP.base = "weapon_base"
- SWEP.Category = "Your SWEPS";
- SWEP.Author = "Ignas[LTU]";
- SWEP.Contact = "";
- SWEP.Purpose = "Minigunshootingkilling";
- SWEP.Instructions = "Mouse 1 to shoot";
- SWEP.PrintName = "Machine Gun";
- SWEP.Slot = 2;
- SWEP.SlotPos = 3;
- SWEP.DrawCrosshair = true;
- SWEP.DrawAmmo = true;
- SWEP.ViewModel = "models/weapons/v_mach_m248para.mdl";
- SWEP.WorldModel = "models/weapons/w_mach_m249para.mdl";
- SWEP.ViewModelFOV = 64;
- SWEP.ReloadSound = "weapons/smg1/smg1_reload.wav";
- SWEP.HoldType = "smg";
- SWEP.Spawnable = true;
- SWEP.AdminSpawnable = true;
- SWEP.Weight = 3;
- SWEP.AutoSwitchTo = false;
- SWEP.AutoSwitchFrom = true;
- SWEP.FiresUnderwater = false;
- SWEP.Primary.ClipSize = 100;
- SWEP.Primary.DefaultClip = 4;
- SWEP.Primary.Recoil = 1;
- SWEP.Primary.Damage = 5;
- SWEP.Primary.NumberofShots = 1;
- SWEP.Primary.Spread = 2;
- SWEP.Primary.Delay = 2;
- SWEP.Primary.Automatic = true;
- SWEP.Primary.Ammo = "SMG1";
- SWEP.Primary.Sound = "weapons/shotgun/shotgun_fire7.wav";
- SWEP.Primary.Force = 2;
- SWEP.Primary.TakeAmmo = 1;
- SWEP.Primary.Message = "/n";
- SWEP.Secondary.Recoil = 1;
- SWEP.Secondary.Damage = 10;
- SWEP.Secondary.NumberofShots = 1;
- SWEP.Secondary.Spread = 0.1;
- SWEP.Secondary.Delay = 0.8;
- SWEP.Secondary.Automatic = false;
- SWEP.Secondary.Ammo = "Pistol";
- SWEP.Secondary.Sound = "weapons/pistol/pistol_fire2.wav";
- SWEP.Secondary.Force = 10;
- SWEP.Secondary.TakeAmmo = 1;
- SWEP.Secondary.Message = "/n";
- function SWEP:Initialize()
- util.PrecacheSound(self.Primary.Sound)
- util.PrecacheSound(self.Secondary.Sound)
- if ( SERVER ) then
- self:SetWeaponHoldType( self.HoldType )
- end
- 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 = 0;
- bullet.Force = self.Primary.Force;
- bullet.Damage = self.Primary.Damage;
- bullet.AmmoType = self.Primary.Ammo;
- local rnda = -self.Primary.Recoil;
- local rndb = self.Primary.Recoil * math.random(-1, 1);
- 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 )
- self:Msg( self.Primary.Message );
- end
- function SWEP:SecondaryAttack()
- end
- function SWEP:Think()
- end
- function SWEP:Reload()
- self.Weapon:DefaultReload(ACT_VM_RELOAD)
- return true
- end
- function SWEP:Deploy()
- self.Weapon:SendWeaponAnim(ACT_VM_DRAW);
- GAMEMODE:SetPlayerSpeed(self.Owner,190,350);
- return true
- end
- function SWEP:Holster()
- return true
- end
- function SWEP:OnRestore()
- end
- function SWEP:Precache()
- end
- function SWEP:OwnerChanged()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement