help dialogs #may have in asking, i forget
#9

try this. sorry for spam
Код:
#include <a_samp>
#include <zcmd>

CMD:radio(playerid, params[])
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{00FF00}Radio", "[Radio Indonesia]Surabaya\n //NEED THIS SIR//", "Okay", "Next");
        return 1;
    }

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) {
        if(response) {
            if(listitem == 0) {
                PlayAudioStreamForPlayer(playerid, "http://49.213.21.119:8000/listen.pls");
            }
            if(listitem == 1) {
                PlayAudioStreamForPlayer(playerid, "");
        	}
    	}
    	else if(!response) {
   	 	ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{00FF00}Radio", "Boneyaad Radio\nIbiza Global Radio\nOff radio", "Okay", "Close");
   	 	}

		return 1;
}
if(dialogid == 2) {
        if(response) {
            if(listitem == 1) {
                PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
            }
            if(listitem == 2) {
                PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=180590");
            }
            if(listitem == 5) {
                PlayAudioStreamForPlayer(playerid, "Radio Stopped sir,");
            }
        }
    }
return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)