Radio help
#7

Quote:
Originally Posted by -CaRRoT
Посмотреть сообщение
Try the fixed code I posted above.

(response) is to check whether there was response to the dialog or not (if they pressed enter) so you'd use if, switch is used to switch between different situations/cases so that would be for the items listed (listitem).

I don't see the need for the first case 1: at all, correct me if I am missing something.
Change it abit but still not working :/

PHP код:
        if(dialogid == DIALOG_CARRADIO2)
        {
             if(
response)
            {
                if(
listitem == 0)
                {
                       
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                    
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=556684"); //Non stop
                
}
                else if(
listitem == 1)
                {
                    
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                     
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=88086"); //Old school rap
                
}
                else if(
listitem == 2)
                {
                      
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                      
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=396275"); //Katy Perry loop
                
}
                else if(
listitem == 3)
                {
                      
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                      
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=772151"); //Radio Nemo
                
}
                else if(
listitem == 4)
                {
                      
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                      
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=121874"); //Caminoweb Radio
                
}
                else if(
listitem == 5)
                {
                      
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                      
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=203721"); //PlayHab.de
                
}
                else if(
listitem == 6)
                {
                      
GameTextForPlayer(playerid"~w~Radio ~g~On"50006);
                      
PlayAudioStreamForPlayer(playerid"http://yp.shoutcast.com/sbin/tunein-station.m3u?id=457678"); //2Pac FanLoop Radio 
Reply


Messages In This Thread
Radio help - by Hellman92 - 27.01.2016, 19:22
Re: Radio help - by FreAkeD - 27.01.2016, 19:27
Re: Radio help - by Hellman92 - 27.01.2016, 19:30
Re: Radio help - by -CaRRoT - 27.01.2016, 19:44
Re: Radio help - by Hellman92 - 27.01.2016, 19:51
Re: Radio help - by -CaRRoT - 27.01.2016, 19:55
Re: Radio help - by Hellman92 - 27.01.2016, 20:35

Forum Jump:


Users browsing this thread: 1 Guest(s)