SA-MP Forums Archive
Radio - 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: Radio (/showthread.php?tid=354344)



Radio - Prosettur - 26.06.2012

Код:
#include <a_samp>
#include <zcmd>

#define DIALOG_RADIO 0

new Radio[][] =
{
	{"Sport\n","http://www.polskastacja.pl/play/sport.pls"},
	{"Hot 100 - Gorąca Setka Nowości\n","http://www.polskastacja.pl/play/hot100.pls"},
	{"Muzyka No Topie\n","http://www.polskastacja.pl/play/mnt_hq.pls"},
	{"Super Przeboje\n","http://www.polskastacja.pl/play/super.pls"}
};

public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
	if(dialogid == DIALOG_RADIO)
	{
	    if(response)
	    {
	        StopAudioStreamForPlayer(playerid);
	        PlayAudioStreamForPlayer(playerid,Radio[listitem][1]);
		}
	}
	return 1;
}

COMMAND:radio(playerid,params[])
{
	new String[200];
	for(new X,A = 4; X < A; X++)
	{
	    strcat(String,Radio[X][0]);
	}
	ShowPlayerDialog(playerid,DIALOG_RADIO,DIALOG_STYLE_LIST,"Radio",String,"Ok","Anuluj");
	return 1;
}
Why dont work? Not music only "Audio stream: etc...".