TTT end round music

Recently i have added end round music to my garrys mod ttt server but for some reason, this code doesnt work.
I have set up a fastdl and have used resource.Addfile for this and it still doesnt work. And yes the download works as i do see the downloaded files in my folder

local InnocentWinSounds = {
“sound/ttt123456INO.mp3”,
“sound/ttt123456INO2.mp3”,
“sound/ttt123456INO3.mp3”
}

– Sounds played when the traitors win
local TraitorWinSounds = {
“sound/ttt123456TRAIT.mp3”,
“sound/ttt123456TRAIT2.mp3”,
“sound/ttt123456TRAIT1.mp3”
}

for k, v in pairs (InnocentWinSounds) do
resource.AddFile(“sound/”…v)
util.PrecacheSound(“sound/”…v)
end

for k, v in pairs (TraitorWinSounds) do
resource.AddFile(“sound/”…v)
util.PrecacheSound(“sound/”…v)
end

local function PlaySoundClip(win)
if win == WIN_INNOCENT then
BroadcastLua(‘surface.PlaySound("’…InnocentWinSounds[math.random(1, #InnocentWinSounds)]…’")’)
elseif win == WIN_TRAITOR then
BroadcastLua(‘surface.PlaySound("’…TraitorWinSounds[math.random(1, #TraitorWinSounds)]…’")’)
end
hook.Add(“TTTEndRound”, “SoundClipEndRound”, PlaySoundClip)


local function PlaySoundClip(win)
if win == WIN_INNOCENT then
BroadcastLua('surface.PlaySound("'..InnocentWinSounds[math.random(1, #InnocentWinSounds)]..'")')
elseif win == WIN_TRAITOR then
BroadcastLua('surface.PlaySound("'..TraitorWinSounds[math.random(1, #TraitorWinSounds)]..'")')
end
hook.Add("TTTEndRound", "SoundClipEndRound", PlaySoundClip)

You had a space in both "InnocentWinSounds"s




local InnocentWinSounds = {
"sound/ttt123456INO.mp3",
"sound/ttt123456INO2.mp3",
"sound/ttt123456INO3.mp3"
}

-- Sounds played when the traitors win
local TraitorWinSounds = {
"sound/ttt123456TRAIT.mp3",
"sound/ttt123456TRAIT2.mp3",
"sound/ttt123456TRAIT1.mp3"
}

for k, v in pairs (InnocentWinSounds) do
resource.AddFile("sound/"..v)
util.PrecacheSound("sound/"..v)
end

for k, v in pairs (TraitorWinSounds) do
resource.AddFile("sound/"..v)
util.PrecacheSound("sound/"..v)
end



You do understand that its currently trying to cache sound/sound/ and then your file (v)?

Here’s one I give out, this one is without music:
https://dl.dropboxusercontent.com/u/26074909/acecool_ttt_end_round.rar

Here’s a newer one I give out, this one is with sounds so you understand where to put things:
https://dl.dropboxusercontent.com/u/26074909/acecool_ttt_end_round_music.rar

With the second one, if you’re an admin you can use: dev_roundsound in console to test sounds - Use it enough times and it’ll play all sounds, if you see any where it says it’s missing, then you know what’s wrong.

Hmm, so if i remove the sound/ line from local InnocentWinSounds = {
then it would work?

That, and TraitorWinSounds; unless you have your sounds in gamemodes/terrortown/content/sound/sound or garrysmod/sound/sound/

Download my second example in my previous post; it shows you where to add sounds in relation to a script which is set up similarly.

Thank you very much, just now i saw your previous post. For some reason i didnt see it before

[editline]23rd February 2014[/editline]

Sorry, but i have one more question. Is there a way to increase the music instead of having to use a program like audacity