Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile( "shared.lua" )
- end
- SWEP.HoldType = "slam"
- if CLIENT then
- SWEP.PrintName = "Jihad Bomb"
- SWEP.Instructions = "bomb"
- SWEP.Slot = 6
- SWEP.SlotPos = 0
- SWEP.IconLetter = "j"
- SWEP.EquipMenuData = {
- type="Weapon",
- model="models/weapons/w_jb.mdl",
- name="Jihad",
- desc="Powerful explosive./nScream at your Enemies xD."
- };
- SWEP.Icon = "VGUI/ttt/icon_jihad"
- end
- SWEP.Base = "weapon_tttbase"
- SWEP.Kind = WEAPON_EQUIP
- SWEP.CanBuy = {ROLE_TRAITOR} -- only traitors can buy
- SWEP.WeaponID = WEAPON_NONE
- SWEP.Spawnable = false
- SWEP.AdminSpawnable = false
- SWEP.ViewModel = "models/weapons/v_jb.mdl"
- SWEP.WorldModel = "models/weapons/w_jb.mdl" --W
- SWEP.Weight = 50
- SWEP.AutoSwitchTo = false
- SWEP.AutoSwitchFrom = false
- SWEP.DrawCrosshair = false
- SWEP.ViewModelFlip = false
- SWEP.Primary.ClipSize = -1
- SWEP.Primary.DefaultClip = -1
- SWEP.Primary.Automatic = true
- SWEP.Primary.Ammo = "none"
- SWEP.Primary.Delay = 2
- SWEP.Secondary.ClipSize = -1
- SWEP.Secondary.DefaultClip = -1
- SWEP.Secondary.Automatic = true
- SWEP.Secondary.Ammo = "none"
- SWEP.Secondary.Delay = 2
- SWEP.NoSights = true
- function SWEP:Reload()
- end
- function SWEP:Initialize()
- util.PrecacheSound("siege/big_explosion.wav")
- util.PrecacheSound("siege/jihad.wav")
- end
- function SWEP:Think()
- end
- function SWEP:PrimaryAttack()
- self.Weapon:SetNextPrimaryFire(CurTime() + 3)
- local effectdata = EffectData()
- effectdata:SetOrigin( self.Owner:GetPos() )
- effectdata:SetNormal( self.Owner:GetPos() )
- effectdata:SetMagnitude( 8 )
- effectdata:SetScale( 1 )
- effectdata:SetRadius( 16 )
- util.Effect( "Sparks", effectdata )
- self.BaseClass.ShootEffects( self )
- if (SERVER) then
- timer.Simple(2, function() self:Asplode() end )
- self.Owner:EmitSound( "siege/jihad.wav" )
- end
- end
- function SWEP:Asplode()
- local k, v
- local ent = ents.Create( "env_explosion" )
- ent:SetPos( self.Owner:GetPos() )
- ent:SetOwner( self.Owner )
- ent:Spawn()
- ent:SetKeyValue( "iMagnitude", "250" )
- ent:Fire( "Explode", 0, 0 )
- ent:EmitSound( "siege/big_explosion.wav", 500, 500 )
- self.Owner:Kill( )
- self.Owner:AddFrags( -1 )
- for k, v in pairs( player.GetAll( ) ) do
- v:ConCommand( "play siege/big_explosion.wav\n" )
- end
- end
- function SWEP:SecondaryAttack()
- self.Weapon:SetNextSecondaryFire( CurTime() + 1 )
- local TauntSound = Sound( "vo/npc/male01/overhere01.wav" )
- self.Weapon:EmitSound( TauntSound )
- if (!SERVER) then return end
- self.Weapon:EmitSound( TauntSound )
- end
- end
Add Comment
Please, Sign In to add comment