Quote:
Originally Posted by Depresie
Is there any way to stop a particular sound from playing?
For example I created a countdown plugin which has background music, but there are special cases when the round begins earlier, and I would like to stop the countdown's background music when the round starts.. I know about stopsound, but afaik it will stop all the sounds
|
Look here:
PHP Code:
#define STOP_SOUND_WAV 0
#define STOP_SOUND_MP3 1
#define STOP_SOUND_ALL 2
stock StopSound(pId, iType = STOP_SOUND_ALL)
{
switch (iType)
{
case STOP_SOUND_WAV: client_cmd(pId, "stopsound");
case STOP_SOUND_MP3: client_cmd(pId, "mp3 stop");
case STOP_SOUND_ALL: client_cmd(pId, "stopsound;mp3 stop");
}
return 1;
}
If one sound is wav and another is mp3 then you can stop one of them particulary , but if they are both mp3 or wav then it's impossible.