[code]
// LLAMA YOU FAG LOOK HERE ADD FILE PATHS BELOW.
local randomsoundsTraitor = {
Sound('LmaoLlama\TraitorWin\LeeroyJ.mp3')
Sound('LmaoLlama\TraitorWin\godsgonnacutudown.mp3')
Sound('LmaoLlama\TraitorWin\whenthemancomesround.mp3')
}
local randomsoundsInnocent = {
Sound('LmaoLlama\InnocentWin\ImnotaterroristInnocentWin.mp3')
Sound('LmaoLlama\InnocentWin\lovehateInnocentWin.mp3')
}
local randomSoundTraitor = table.Random(randomsoundsTraitor)
local randomSoundInnocent = table.Random(randomsoundsInnocent)
// STOP SCROLLING
if e.win == WIN_TRAITOR then
return "The traitors won the round!"
surface.PlaySound( randomSoundTraitor )
elseif e.win == WIN_INNOCENT then
return "The pure and innocent terrorists won the round!"
surface.PlaySound( randomsoundInnocent )
elseif e.win == WIN_TIMELIMIT then
return "The traitors lost when the timelimit was reached!"
surface.PlaySound( randomsoundInnocent )
else
return "The round ended"
end
end
[/code]
Music just don't play, any idea?
You're returning before playing the sound. Move the lines with return to after the sound is played.
[QUOTE=Disseminate;21514056]You're returning before playing the sound. Move the lines with return to after the sound is played.[/QUOTE]
Still doesn't work..
[code]
if e.win == WIN_TRAITOR then
"The traitors won the round!"
surface.PlaySound( randomSoundTraitor )
return
elseif e.win == WIN_INNOCENT then
"The pure and innocent terrorists won the round!"
surface.PlaySound( randomsoundInnocent )
return
elseif e.win == WIN_TIMELIMIT then
"The traitors lost when the timelimit was reached!"
surface.PlaySound( randomsoundInnocent )
return
else
return "The round ended"
end
end
[/code]
1. You forgot to move the strings with the return statements. Right now you have a bunch of strings floating in space.
2. It's possible e.win isn't equal to any of those things.
[lua] // LLAMA YOU FAG LOOK HERE ADD FILE PATHS BELOW.
local randomsoundsTraitor = {
Sound('LmaoLlama\TraitorWin\LeeroyJ.mp3'),
Sound('LmaoLlama\TraitorWin\godsgonnacutudown.mp3'),
Sound('LmaoLlama\TraitorWin\whenthemancomesround.mp3')
}
local randomsoundsInnocent = {
Sound('LmaoLlama\InnocentWin\ImnotaterroristInnocentWin.mp3'),
Sound('LmaoLlama\InnocentWin\lovehateInnocentWin.mp3')
}
local randomSoundTraitor = table.Random(randomsoundsTraitor)
local randomSoundInnocent = table.Random(randomsoundsInnocent)
// STOP SCROLLING
if e.win == WIN_TRAITOR then
surface.PlaySound( randomSoundTraitor )
return "The traitors won the round!"
elseif e.win == WIN_INNOCENT then
surface.PlaySound( randomsoundInnocent )
return "The pure and innocent terrorists won the round!"
elseif e.win == WIN_TIMELIMIT then
surface.PlaySound( randomsoundInnocent )
return "The traitors lost when the timelimit was reached!"
else
return "The round ended"
end
end[/lua]
Sorry, you need to Log In to post a reply to this thread.