Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. SWEP.PrintName = "Wand" -- The name of the weapon
  2.  
  3. SWEP.Author = "Liza"
  4. SWEP.Purpose = "make people uncomfortable while you caress them with death"
  5. SWEP.Instructions = "left click to fire single round right click to fire semi auto shotgun"
  6. SWEP.Category = "Liza's Sweps" --This is required or else your weapon will be placed under "Other"
  7. SWEP.Spawnable= true --Must be true
  8. SWEP.AdminOnly = false
  9. SWEP.Base = "weapon_base"
  10.  
  11. local ShootSound = Sound("Weapon_Pistol.Single")
  12. SWEP.Primary.Damage = 200 --The amount of damage will the weapon do
  13. SWEP.Primary.TakeAmmo = 1 -- How much ammo will be taken per shot
  14. SWEP.Primary.ClipSize = 50 -- How much bullets are in the mag
  15. SWEP.Primary.Ammo = "SniperRound" --The ammo type will it use
  16. SWEP.Primary.DefaultClip = 100 -- How much bullets preloaded when spawned
  17. SWEP.Primary.Spread = 0.0 -- The spread when shot
  18. SWEP.Primary.NumberofShots = 5 -- Number of bullets when shot
  19. SWEP.Primary.Automatic = true -- Is it automatic
  20. SWEP.Primary.Recoil = 0.0 -- The amount of recoil
  21. SWEP.Primary.Delay = 0.0 -- Delay before the next shot
  22. SWEP.Primary.Force = 10000
  23.  
  24. SWEP.Secondary.ClipSize = -1
  25. SWEP.Secondary.DefaultClip = -1
  26. SWEP.Secondary.Automatic = false
  27. SWEP.Secondary.Ammo = "none"
  28.  
  29. SWEP.Slot = 1
  30. SWEP.SlotPos = 1
  31. SWEP.DrawCrosshair = true --Does it draw the crosshair
  32. SWEP.DrawAmmo = true
  33. SWEP.Weight = 1 --Priority when the weapon your currently holding drops
  34. SWEP.AutoSwitchTo = false
  35. SWEP.AutoSwitchFrom = false
  36.  
  37. SWEP.ViewModelFlip = false
  38. SWEP.ViewModelFOV = 60
  39. SWEP.ViewModel = "none"
  40. SWEP.WorldModel = "none"
  41. SWEP.UseHands = true
  42.  
  43. SWEP.HoldType = "magic"
  44.  
  45. SWEP.FiresUnderwater = true
  46.  
  47. SWEP.ReloadSound = "sound/epicreload.wav"
  48.  
  49. SWEP.CSMuzzleFlashes = false
  50.  
  51. function SWEP:Initialize()
  52. util.PrecacheSound(ShootSound)
  53. util.PrecacheSound(self.ReloadSound)
  54. self:SetWeaponHoldType( self.HoldType )
  55. end
  56.  
  57. function SWEP:PrimaryAttack()
  58.  
  59. if ( !self:CanPrimaryAttack() ) then return end
  60.  
  61. local bullet = {}
  62. bullet.Num = self.Primary.NumberofShots
  63. bullet.Src = self.Owner:GetShootPos()
  64. bullet.Dir = self.Owner:GetAimVector()
  65. bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0)
  66. bullet.Tracer = 1
  67. bullet.Force = self.Primary.Force
  68. bullet.Damage = self.Primary.Damage
  69. bullet.AmmoType = self.Primary.Ammo
  70.  
  71. local rnda = self.Primary.Recoil * -1
  72. local rndb = self.Primary.Recoil * math.random(-1,1)
  73.  
  74. self:ShootEffects()
  75.  
  76. self.Owner:FireBullets( bullet )
  77. self:EmitSound(ShootSound)
  78. self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) )
  79. self:TakePrimaryAmmo(self.Primary.TakeAmmo)
  80.  
  81. self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
  82. end
  83.  
  84.  
  85. function SWEP:SecondaryAttack()
  86.  
  87. end
  88.  
  89. function SWEP:Reload()
  90. self:EmitSound(Sound(self.ReloadSound))
  91. self.Weapon:DefaultReload( ACT_VM_RELOAD );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement