Jihad Bomb Sound problem

Heya,

So I want to add a Jihad bomb to my TTT server for a T weapon. Everything works fine (like the explsion, the damage etc.) except for one of the sounds, the sound of the “ayayaayayaya”.

Here is my script:


if SERVER then
   AddCSLuaFile( "shared.lua" );
   resource.AddFile("sound/items/jihad.wav");
end
 
SWEP.HoldType                   = "slam"
 
if CLIENT then
   SWEP.PrintName                       = "Jihad"
   SWEP.Slot                            = 7
 
   SWEP.EquipMenuData = {
      type  = "item_weapon",
      name  = "Jihad Bomb",
      desc  = "Down With America !"
   };
 
   SWEP.Icon = "VGUI/ttt/icon_c4"
end
 resource.AddFile("VGUI/ttt/icon_bsgc_c4")

 
SWEP.Base = "weapon_tttbase"
 
SWEP.Kind = WEAPON_EQUIP
SWEP.CanBuy = {ROLE_TRAITOR}
SWEP.WeaponID = AMMO_C4
 
SWEP.ViewModel  = Model("models/weapons/v_c4.mdl")
SWEP.WorldModel = Model("models/weapons/w_c4.mdl")
resource.AddFile("models/weapons/v_c4.mdl")
resource.AddFile("models/weapons/w_c4.mdl")


SWEP.DrawCrosshair          = false
SWEP.ViewModelFlip          = false
SWEP.Primary.ClipSize       = -1
SWEP.Primary.DefaultClip    = -1
SWEP.Primary.Automatic      = false
SWEP.Primary.Ammo           = "none"
SWEP.Primary.Delay          = 5.0
 
SWEP.Secondary.ClipSize     = -1
SWEP.Secondary.DefaultClip  = -1
SWEP.Secondary.Automatic    = false
SWEP.Secondary.Ammo         = "none"
 
SWEP.NoSights               = true
 

 
function SWEP:Reload()
end  
 
function SWEP:Initialize()
    util.PrecacheSound("items/jihad.wav")
end
 
 
function SWEP:Think()  
end
 
 

function SWEP:PrimaryAttack()
  self.Weapon:SetNextPrimaryFire(CurTime() + 2)    

  local effectdata = EffectData()
  effectdata:SetOrigin( self.Owner:GetPos() )
  effectdata:SetNormal( self.Owner:GetPos() )
  effectdata:SetMagnitude( 8 )
  effectdata:SetScale( 1 )
  effectdata:SetRadius( 76 )
  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( "items/jihad.wav" )                -- This bit is the EmitSound for the ayayayay
  end 
end
 

function SWEP:Asplode()
  local k, v
            
  local ent = ents.Create( "env_explosion" )
  ent:SetPos( self.Owner:GetPos() )
  ent:SetOwner( self.Owner )
  ent:SetKeyValue( "iMagnitude", "150" )
  ent:Spawn()
  ent:Fire( "Explode", 0, 0 )
  ent:EmitSound( "siege/big_explosion.wav", 200, 200 )
  self:Remove()
end
 
 

function SWEP:SecondaryAttack()
  self.Weapon:SetNextSecondaryFire( CurTime() + 1 )
  local TauntSound = Sound( "vo/npc/male01/overhere01.wav" )
  self.Weapon:EmitSound( TauntSound )
end

And here is the directory for the sound:

Thanks,
Tarado

Is it FastDL’d and in your garrysmod directory?

No I cannot fastdl as the files are on my computer

It should be sound/items/jihad.wav

It is in there …

Edit The problem is that people aren’t downloading the file from the server, i put the jihad.wav in my own directory and it worked, so the “Resource.AddFile” is not working

I’m sure Resource.AddFile is working fine, it’s probably your FastDL directory that’s not set up properly.

If you don’t have a fastdl, people can’t download it… Even if it’s in the server
Oh wait, forget it… Do you have sv_allowdownload 1?

Ok i solved the problem, I put the resource.AddFile to a “forcedownload.lua” file i made with the server maps and such. It works now for everyone.