Raised This Month: $ Target: $400
 0% 

[HELP] Stoping a particular sound?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-15-2016 , 10:35   [HELP] Stoping a particular sound?
Reply With Quote #1

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
__________________

Last edited by Depresie; 01-15-2016 at 10:38.
Depresie is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-15-2016 , 12:36   Re: [HELP] Stoping a particular sound?
Reply With Quote #2

Quote:
Originally Posted by Depresie View Post
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(pIdiType STOP_SOUND_ALL)
{
        switch (
iType)
        {
                case 
STOP_SOUND_WAVclient_cmd(pId"stopsound");
                case 
STOP_SOUND_MP3client_cmd(pId"mp3 stop");
                case 
STOP_SOUND_ALLclient_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.
siriusmd99 is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-15-2016 , 13:38   Re: [HELP] Stoping a particular sound?
Reply With Quote #3

Ah.. I see, thanks for your answer
__________________
Depresie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode