Hi i am trying to get round ending musin working on my TTT server but all i get is errors upon errors. i have searched google inside out for an answer and found nothing. here is my script and error i get in console
[CODE]local function PlayMusic(wintype)
if wintype == WIN_INNOCENT then
BroadcastLua('surface.PlaySound("winner.mp3")')
elseif wintype == WIN_TRAITOR then
BroadcastLua('surface.PlaySound("ttt/traitor_win1.mp3") ')
elseif wintype == WIN_TIMELIMIT then
BroadcastLua('surface.PlaySound("ttt/innocent_win1.mp3")')
end
end
hook.Add("TTTEndRound", "MyMusic", PlayMusic)[/CODE]
and in console it sais "Create stream Failed error 41"
Then below it sais "Failed to load sound "winner.mp3", file probably missing from disk/repository
T"
please help me!
Please somebody help,
someone please help me
This is already working. It did look fine. But you don't have winner.mp3 in garrysmod/garrysmod/sound/ thats why its not working. You need to setup FastDL also.
This is probably more stable. [url]http://www.garrysmod.org/downloads/?a=view&id=134510[/url]
This is the one I give out to help people learn Lua.
Feel free to learn from it, and expand on it.
[url]https://dl.dropboxusercontent.com/u/26074909/ttt_end_round.rar[/url]
The thing is, I see my fastDL download the music. I have it in my garrysmod>sound and i see the fastdl download winner.mp3 But it still doesnt work.
I also jus tried the script above, and the music still drops the same error. i have the music in sound>round and i have changed the files to point to my music and it still doesnt work :(
Sorry, you need to Log In to post a reply to this thread.