Guest User

jihad ttt share.lua

a guest
Jan 2nd, 2014
182
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if SERVER then
  2. AddCSLuaFile( "shared.lua" ); 211376997
  3. resource.AddWorkshop( "211376997" ) <--ADDED THIS LINE
  4. resource.AddFile("sound/siege/jihad.wav");
  5. resource.AddFile("sound/siege/big_explosion.wav");
  6. end
  7.  
  8. SWEP.HoldType = "slam"
  9.  
  10. if CLIENT then
  11. SWEP.PrintName = "Jihad"
  12. SWEP.Slot = 7
  13.  
  14. SWEP.EquipMenuData = {
  15. type = "item_weapon",
  16. name = "Jihad bomb",
  17. desc = "Left click goes boom!"
  18. };
  19.  
  20. SWEP.Icon = "VGUI/ttt/icon_c4"
  21. end
  22. resource.AddFile("VGUI/ttt/icon_c4")
  23.  
  24.  
  25. SWEP.Base = "weapon_tttbase"
  26.  
  27. SWEP.Kind = WEAPON_EQUIP
  28. SWEP.CanBuy = {ROLE_TRAITOR}
  29. SWEP.WeaponID = AMMO_C4
  30.  
  31. SWEP.ViewModel = Model("models/weapons/v_c4.mdl")
  32. SWEP.WorldModel = Model("models/weapons/w_c4.mdl")
  33. resource.AddFile("models/weapons/v_c4.mdl")
  34. resource.AddFile("models/weapons/w_c4.mdl")
  35.  
  36.  
  37. SWEP.DrawCrosshair = false
  38. SWEP.ViewModelFlip = false
  39. SWEP.Primary.ClipSize = -1
  40. SWEP.Primary.DefaultClip = -1
  41. SWEP.Primary.Automatic = false
  42. SWEP.Primary.Ammo = "none"
  43. SWEP.Primary.Delay = 5.0
  44.  
  45. SWEP.Secondary.ClipSize = -1
  46. SWEP.Secondary.DefaultClip = -1
  47. SWEP.Secondary.Automatic = false
  48. SWEP.Secondary.Ammo = "none"
  49.  
  50. SWEP.NoSights = true
  51.  
  52.  
  53.  
  54. function SWEP:Reload()
  55. end
  56.  
  57. function SWEP:Initialize()
  58. util.PrecacheSound("siege/big_explosion.wav")
  59. util.PrecacheSound("enderx_leroyjihad.wav") <--CHANGED THIS LINE
  60. end
  61.  
  62.  
  63. function SWEP:Think()
  64. end
  65.  
  66.  
  67.  
  68. function SWEP:PrimaryAttack()
  69. self.Weapon:SetNextPrimaryFire(CurTime() + 2)
  70.  
  71. local effectdata = EffectData()
  72. effectdata:SetOrigin( self.Owner:GetPos() )
  73. effectdata:SetNormal( self.Owner:GetPos() )
  74. effectdata:SetMagnitude( 8 )
  75. effectdata:SetScale( 1 )
  76. effectdata:SetRadius( 76 )
  77. util.Effect( "Sparks", effectdata )
  78. self.BaseClass.ShootEffects( self )
  79.  
  80. -- The rest is only done on the server
  81. if (SERVER) then
  82. timer.Simple(2, function() self:Asplode() end )
  83. self.Owner:EmitSound( "enderx_leroyjihad.wav" ) <--CHANGED THIS LINE
  84. end
  85. end
  86.  
  87.  
  88. function SWEP:Asplode()
  89. local k, v
  90.  
  91. local ent = ents.Create( "env_explosion" )
  92. ent:SetPos( self.Owner:GetPos() )
  93. ent:SetOwner( self.Owner )
  94. ent:SetKeyValue( "iMagnitude", "150" )
  95. ent:Spawn()
  96. ent:Fire( "Explode", 0, 0 )
  97. ent:EmitSound( "siege/big_explosion.wav", 500, 500 )
  98. end
  99.  
  100.  
  101.  
  102. function SWEP:SecondaryAttack()
  103. self.Weapon:SetNextSecondaryFire( CurTime() + 1 )
  104. local TauntSound = Sound( "vo/npc/male01/overhere01.wav" )
  105. self.Weapon:EmitSound( TauntSound )
  106. end
RAW Paste Data