SA-MP Forums Archive
Audio Streaming - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Audio Streaming (/showthread.php?tid=330812)



Audio Streaming - spd_sahil - 02.04.2012

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");
                        }
                    }



Re: Audio Streaming - TheArcher - 02.04.2012

you need to put the whole function.


Re: Audio Streaming - spd_sahil - 02.04.2012

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


Re: Audio Streaming - TheArcher - 02.04.2012

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


Re: Audio Streaming - spd_sahil - 02.04.2012

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