Fighter Posted September 14, 2012 Share Posted September 14, 2012 Basically, what I'm trying to do is make a music command (serverside) that will stop the current map music, and play a song specified by an admin from the music folder for everyone on the server that will loop. I've managed to add the ability to play sound likes taunts, screams, etc from the sound folder: http://slexy.org/view/s20agBvF6H However, this won't let me stop the current map music and play a song from the music folder, as when I try to do that, I get an error that the file is stereo. Could someone point me in the right direction on how to stop the current map music and play a stereo sound file for everyone on the server? Thanks. Link to comment
Solution eezstreet Posted September 14, 2012 Solution Share Posted September 14, 2012 (edited) You need to set the music configstring in order to make it play the music. trap_SetConfigstring( CS_MUSIC, soundPath ); Best way to check if you're playing music or sound (if you're altering your sound command to play music for each client as well) is to check the beginning of the file name thusly: if(!Q_stricmpn(soundPath, "sound/", 6)) { if(!Q_stricmpn(soundPath, "music/", 6)) { Edited September 14, 2012 by eezstreet Fighter likes this Link to comment
Fighter Posted September 14, 2012 Author Share Posted September 14, 2012 Thanks for the help. I'll try it out soon. Link to comment
Fighter Posted September 16, 2012 Author Share Posted September 16, 2012 Just tested and it works exactly as I wanted it to. Thanks a lot eezstreet. This can be marked as solved. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now