CapsAdmin

Untitled

Aug 1st, 2011
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. local SWEP = {Primary = {}, Secondary = {}}
  2.  
  3. SWEP.Base = "weapon_cs_base"
  4. SWEP.ClassName = "where_is_my"
  5. SWEP.PrintName = "where is my"
  6.  
  7.  
  8. SWEP.Primary.Sound = "sound/seeya.wav" // The sound that plays when you shoot :]
  9. SWEP.Primary.Damage = 1000 // How much damage the swep is doing
  10. SWEP.Primary.TakeAmmo = 1 // How much ammo does it take for each shot ?
  11. SWEP.Primary.ClipSize = 100 // The clipsize
  12. SWEP.Primary.Ammo = "Pistol" // ammmo type pistol/ smg1
  13. SWEP.Primary.DefaultClip = 100 // How much ammo does the swep come with `?
  14. SWEP.Primary.Spread = 0.1 // Does the bullets spread all over, if you want it fire exactly where you are aiming leave it o.1
  15. SWEP.Primary.NumberofShots = 1 // How many bullets you are firing each shot.
  16. SWEP.Primary.Automatic = false // Is the swep automatic ?
  17. SWEP.Primary.Recoil = 10 // How much we should punch the view
  18. SWEP.Primary.Delay = 3 // How long time before you can fire again
  19. SWEP.Primary.Force = 1000 // The force of the shot
  20.  
  21. function SWEP:PrimaryAttack()
  22.  
  23.     self.BaseClass.PrimaryAttack(self)
  24.    
  25.  end
  26.  
  27. for _, wep in pairs(ents.FindByClass(SWEP.ClassName)) do
  28.     wep:SetTable(table.Merge(wep:GetTable(), SWEP))
  29. end
  30.  
  31. weapons.Register(SWEP, SWEP.ClassName, true)
  32.  
  33. if SERVER then
  34.     Ply"kapz":Give(SWEP.ClassName)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment