Audio Streaming
#1

Can somebody guide me(logic wise) on making a non buggy script , for creating a radio which is placed at a certain co-ordinate.. and people who come near it can hear it..
ive been trying.. i end up with lot of echoes..

my code :-

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://173.236.56.82:8004/listen.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://173.192.224.123:8543/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://stream.hitparty.net:8000/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://uplink.duplexfx.com:8010/listen.pls",-691.5498,934.7952,13.6328,25,1);
                                    Genre = 5;
                                }
                            }
                            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 = 6;
                                }
                            }
                            SendClientMessage(playerid,COLOR_GREEN,"Radio Genre Activated");
                        }
                    }
Reply
#2

you need to put the whole function.
Reply
#3

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
you need to put the whole function.
what do you mean by that what function ?
Reply
#4

you've put the code from your "stock" or "public" function and after switch statement.
Reply
#5

ohhh
this from ondialogresponse the dialog is called from a dcmd command these are the listitems of the dialog which is called
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)