Advertisement
Guest User

Mp5

a guest
Nov 29th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1.  
  2. AddCSLuaFile()
  3.  
  4. SWEP.HoldType = "ar2"
  5.  
  6. if CLIENT then
  7.  
  8. SWEP.PrintName = "MP5"
  9. SWEP.Slot = 2
  10.  
  11. SWEP.Icon = "vgui/ttt/icon_mac"
  12. end
  13.  
  14.  
  15. SWEP.Base = "weapon_tttbase"
  16.  
  17. SWEP.Kind = WEAPON_HEAVY
  18. SWEP.WeaponID = AMMO_MAC10
  19.  
  20. SWEP.Primary.Damage = 16
  21. SWEP.Primary.Delay = 0.10
  22. SWEP.Primary.Cone = 0.03
  23. SWEP.Primary.ClipSize = 30
  24. SWEP.Primary.ClipMax = 60
  25. SWEP.Primary.DefaultClip = 30
  26. SWEP.Primary.Automatic = true
  27. SWEP.Primary.Ammo = "smg1"
  28. SWEP.Primary.Recoil = 1.15
  29. SWEP.Primary.Sound = Sound( "Weapon_MP5Navy.Single" )
  30.  
  31. SWEP.AutoSpawnable = true
  32.  
  33. SWEP.AmmoEnt = "item_ammo_smg1_ttt"
  34.  
  35. SWEP.UseHands = true
  36. SWEP.ViewModelFlip = false
  37. SWEP.ViewModelFOV = 54
  38. SWEP.ViewModel = "models/weapons/cstrike/c_smg_mp5.mdl"
  39. SWEP.WorldModel = "models/weapons/w_smg_mp5.mdl"
  40.  
  41. SWEP.IronSightsPos = Vector( -5.361, -7.481, 1.559 )
  42. SWEP.IronSightsAng = Vector( 2, 0, 0 )
  43.  
  44. function SWEP:GetHeadshotMultiplier(victim, dmginfo)
  45. local att = dmginfo:GetAttacker()
  46. if not IsValid(att) then return 2 end
  47.  
  48. local dist = victim:GetPos():Distance(att:GetPos())
  49. local d = math.max(0, dist - 150)
  50.  
  51. -- decay from 3.2 to 1.7
  52. return 1.7 + math.max(0, (1.5 - 0.002 * (d ^ 1.25)))
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement