Audio Streaming
#1

If have a code something like this.. for audio streams.. now sometimes when im switching channels , i hear two streams.. but displays only for one.. and when enter command to completely stop streams.. i still hear the one which was stuck before.



pawn Код:
case 0:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                    PlayAudioStreamForPlayer(i,"http://somafm.com/tags.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 1;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                        case 1:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                    PlayAudioStreamForPlayer(i,"http://listen.di.fm/public3/dubstep.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 2;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                        case 2:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                    PlayAudioStreamForPlayer(i,"http://www.chronixradio.com/chronixaggression/listen/listen.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 3;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                        case 3:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                     PlayAudioStreamForPlayer(playerid,"http://www.defjay.de/listen.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 4;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                        case 4:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                     PlayAudioStreamForPlayer(playerid,"http://www.streamakaci.com/radios/4uclassicrock.asx",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 4;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                        case 5:
                        {
                            for(new i;i<MAX_PLAYERS;i++)
                            {
                                if(IsPlayerConnected(i))
                                {
                                    StopAudioStreamForPlayer(i);
                                    PlayAudioStreamForPlayer(playerid,"http://www.acousticalternative.com/listen.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 4;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
Reply


Messages In This Thread
Audio Streaming - by spd_sahil - 31.03.2012, 12:06
Re: Audio Streaming - by spd_sahil - 31.03.2012, 13:47
Re: Audio Streaming - by nmader - 31.03.2012, 13:56

Forum Jump:


Users browsing this thread: 2 Guest(s)