Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1.  
  2.  
  3. // Variables that are used on both client and server
  4.  
  5. SWEP.Author = "Stingwraith"
  6. SWEP.Contact = "stingwraith123@yahoo.com"
  7. SWEP.Purpose = "Sacrifice yourself for Allah."
  8. SWEP.Instructions = "Left Click to make yourself EXPLODE. Right click to taunt."
  9. SWEP.DrawCrosshair = false
  10. SWEP.Base = "weapon_tttbase"
  11.  
  12. SWEP.Spawnable = true
  13. SWEP.AdminSpawnable = true // Spawnable in singleplayer or by server admins
  14.  
  15. SWEP.ViewModel = "models/weapons/v_jb.mdl"
  16. SWEP.WorldModel = "models/weapons/w_jb.mdl"
  17. SWEP.Icon = "VGUI/ttt/icon_kbjihad"
  18.  
  19. SWEP.Primary.ClipSize = -1
  20. SWEP.Primary.DefaultClip = -1
  21. SWEP.Primary.Automatic = false
  22. SWEP.Primary.Ammo = "none"
  23. SWEP.Primary.Delay = 3
  24.  
  25. SWEP.Secondary.ClipSize = -1
  26. SWEP.Secondary.DefaultClip = -1
  27. SWEP.Secondary.Automatic = false
  28. SWEP.Secondary.Ammo = "none"
  29. SWEP.Kind = WEAPON_EQUIP
  30. SWEP.CanBuy = { ROLE_TRAITOR }
  31.  
  32. SWEP.EquipMenuData = {
  33. type = "Suicide Bomber",
  34. desc = "Sacrifice yourself for 80 virgins."
  35. };
  36.  
  37.  
  38. /*---------------------------------------------------------
  39. Reload does nothing
  40. ---------------------------------------------------------*/
  41. function SWEP:Reload()
  42. end
  43.  
  44. function SWEP:Initialize()
  45. util.PrecacheSound("siege/big_explosion.wav")
  46. util.PrecacheSound("siege/jihad.wav")
  47. end
  48.  
  49.  
  50. /*---------------------------------------------------------
  51. Think does nothing
  52. ---------------------------------------------------------*/
  53. function SWEP:Think()
  54. end
  55.  
  56.  
  57. /*---------------------------------------------------------
  58. PrimaryAttack
  59. ---------------------------------------------------------*/
  60. function SWEP:PrimaryAttack()
  61. self.Weapon:SetNextPrimaryFire(CurTime() + 3)
  62.  
  63.  
  64. local effectdata = EffectData()
  65. effectdata:SetOrigin( self.Owner:GetPos() )
  66. effectdata:SetNormal( self.Owner:GetPos() )
  67. effectdata:SetMagnitude( 8 )
  68. effectdata:SetScale( 1 )
  69. effectdata:SetRadius( 16 )
  70. util.Effect( "Sparks", effectdata )
  71.  
  72. self.BaseClass.ShootEffects( self )
  73.  
  74.  
  75. // The rest is only done on the server
  76. if (SERVER) then
  77. timer.Simple(2, function() self:Asplode() end )
  78. self.Owner:EmitSound( "siege/jihad.wav" )
  79. end
  80.  
  81. end
  82.  
  83. --The asplode function
  84. function SWEP:Asplode()
  85. local k, v
  86.  
  87. // Make an explosion at your position
  88. local ent = ents.Create( "env_explosion" )
  89. ent:SetPos( self.Owner:GetPos() )
  90. ent:SetOwner( self.Owner )
  91. ent:Spawn()
  92. ent:SetKeyValue( "iMagnitude", "250" )
  93. ent:Fire( "Explode", 0, 0 )
  94. ent:EmitSound( "siege/big_explosion.wav", 500, 500 )
  95.  
  96. self.Owner:Kill( )
  97. self.Owner:AddFrags( -1 )
  98.  
  99. for k, v in pairs( player.GetAll( ) ) do
  100. v:ConCommand( "play siege/big_explosion.wav\n" )
  101. end
  102.  
  103. end
  104.  
  105.  
  106. /*---------------------------------------------------------
  107. SecondaryAttack
  108. ---------------------------------------------------------*/
  109. function SWEP:SecondaryAttack()
  110.  
  111. self.Weapon:SetNextSecondaryFire( CurTime() + 1 )
  112.  
  113. local TauntSound = Sound( "vo/npc/male01/overhere01.wav" )
  114.  
  115. self.Weapon:EmitSound( TauntSound )
  116.  
  117. // The rest is only done on the server
  118. if (!SERVER) then return end
  119.  
  120. self.Weapon:EmitSound( TauntSound )
  121.  
  122.  
  123. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement