Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 12:59:36 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Music problem
Pages: [1]
Author Topic: Music problem  (Read 4372 times)
lonwol
Poster

Posts: 6


« on: July 08, 2011, 08:10:50 PM »

I have a problem with how the music plays on my server, the music I set for the beginning will play, but not the end one.

hook.Add("TTTBeginRound", "play sounds!", function()
   surface.PlaySound("ttt/lonsun.mp3");
end);


This is what I put for the beginning of the round.

hook.Add("TTTEndRound", "play sounds!", function()
   surface.PlaySound("ttt/lontake.mp3");
end);


The file downloads fine but it's not playing. Also, if I switch the two mp3's around lontake.mp3 runs fine.
EDIT: I take that back, lontake.mp3 won't play at either the beginning or the end of the round, so it's probably just the file itself.
EDIT2: lontake.mp3 Plays fine, but when I try it on the server it doesn't play. (ULX's playsound command). I'm sure it downloaded aswell as I can find it in my gmod's sound folder.
« Last Edit: July 08, 2011, 08:33:47 PM by lonwol »
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: July 08, 2011, 09:15:12 PM »

Both the hooks have the same name.

Try this

hook.Add("TTTBeginRound", "PlaySounds1", function()
   BroadcastLua('surface.PlaySound("ttt/lonsun.mp3")');
end);      

hook.Add("TTTEndRound", "PlaySounds2", function()
   BroadcastLua('surface.PlaySound("ttt/lontake.mp3")');
end);      
lonwol
Poster

Posts: 6


« Reply #2 on: July 09, 2011, 01:27:34 AM »

Both the hooks have the same name.

Try this

hook.Add("TTTBeginRound", "PlaySounds1", function()
    BroadcastLua('surface.PlaySound("ttt/lonsun.mp3")');
end);     

hook.Add("TTTEndRound", "PlaySounds2", function()
    BroadcastLua('surface.PlaySound("ttt/lontake.mp3")');
end);     


That is something else wrong with it, thank you for that, but regardless it won't play no matter what I do. I've checked the file and it seems fine, so I have no idea what's wrong with it.
Handy_man
Poster

Posts: 308


SNG community admin


« Reply #3 on: July 09, 2011, 01:32:33 AM »

That is something else wrong with it, thank you for that, but regardless it won't play no matter what I do. I've checked the file and it seems fine, so I have no idea what's wrong with it.


Can you view logs/ the console while the event is being triggered, looking for errors basically.

[b]
Sky-netgaming.com
lonwol
Poster

Posts: 6


« Reply #4 on: July 09, 2011, 02:06:08 AM »

Nothing pops up in console. lonsun.mp3 will play regardless but lontake.mp3 will not.
Handy_man
Poster

Posts: 308


SNG community admin


« Reply #5 on: July 09, 2011, 02:19:12 AM »

Im assuming the music is perfectly fine to play, but perhaps you should humor yourself by replacing the mp3 played on the working one to the non working one to test the mp3 playing in the server.

[b]
Sky-netgaming.com
Colonel_Black
Poster

Posts: 15


« Reply #6 on: July 12, 2011, 07:27:17 PM »

Perhaps it is playing, but you haven't got it clientside to play?
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Music problem « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.013 seconds with 17 queries.