• my jihad bomb wont play sound wants wrong?
    1 replies, posted
it wont play the sound when it blows up. tell me if there any other problems to [CODE]SWEP.HoldType = "grenade" if CLIENT then SWEP.PrintName = "Jihad Bomb" SWEP.Slot = 6 SWEP.Icon = "VGUI/ttt/icon_c4" end SWEP.Base = "weapon_tttbasegrenade" SWEP.Kind = WEAPON_EQUIP1 SWEP.WeaponID = AMMO_MOLOTOV SWEP.CanBuy = { ROLE_TRAITOR } SWEP.InLoadoutFor = nil SWEP.LimitedStock = true SWEP.AllowDrop = true SWEP.IsSilent = false SWEP.NoSights = true SWEP.ViewModel = "models/weapons/v_jb.mdl" SWEP.WorldModel = "models/weapons/w_jb.mdl" SWEP.Weight = 5 SWEP.AutoSpawnable = false SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Primary.Delay = 3 SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" /*--------------------------------------------------------- Reload taunts ---------------------------------------------------------*/ function SWEP:Reload() local TauntSound = Sound( "vo/npc/male01/overhere01.wav" ) self.Weapon:EmitSound( TauntSound ) // The rest is only done on the server if (!SERVER) then return end self.Weapon:EmitSound( TauntSound ) end /*--------------------------------------------------------- Think does nothing ---------------------------------------------------------*/ function SWEP:Think() end /*--------------------------------------------------------- PrimaryAttack ---------------------------------------------------------*/ 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 ) // The rest is only done on the server if SERVER then timer.Simple(2, function() self:Asplode() end ) self.Owner:EmitSound( "siege/jihad.mp3" ) end end --The asplode function function SWEP:Asplode() local k, v // Make an explosion at your position 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/WTFbomb.mp3", 500, 500 ) self.Owner:Kill( ) self.Owner:AddFrags( -1 ) for k, v in pairs( player.GetAll( ) ) do v:ConCommand( "play siege/WTFbomb.mp3\n" ) end end /*--------------------------------------------------------- SecondaryAttack ---------------------------------------------------------*/ if SERVER then AddCSLuaFile ("shared.lua"); end SWEP.Delay = 3.75 SWEP.Armed = true local ShootSound = Sound ("leeroy.wav"); local SplodeSound = Sound ("explosion1.wav"); function Kapoom( ply ) if ply:Alive() then local explode = ents.Create( "env_explosion" ) explode:SetPos( ply:GetPos() ) explode:SetOwner( ply ) explode:Spawn() explode:SetKeyValue( "iMagnitude", "220" ) explode:Fire( "Explode", 0, 0 ) explode:EmitSound( SplodeSound, 100, 1 ) end end function SWEP:SecondaryAttack() if self.Armed == true then return end self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) self.Weapon:EmitSound (ShootSound); self.Armed = true timer.Create( "time_before_boom", 3.75, 1, function( ) if self.Owner ~= nil then Kapoom( self.Owner ) end end ) end[/CODE]
I can only forsee this problem being with the sound being installed in the wrong directory, / installed wrong.
Sorry, you need to Log In to post a reply to this thread.