Radio Help(+rep)
#1

I have this radio script
Код:
CMD:radio(playerid, params[])
{
	ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Pick your Channel/Song",
	"{FF0000}Double Take\n{00FF00}A Billion Hits\n{0000FF}Better Together\n{FFFF00}Don't Look Down\n{FF5600}Can't Do It Without You\n{FF00FF}The Way That You Do\nIt's me It's You\n{00FFFF}Who I Am\n{00FF00}Not a Love Song\n{FF00FF}Stop Radio", "Choose", "Cancel");
    SendCommandToAdmins(playerid,"/radio");
	return 1;
When I do /radio a box comes asking the name of song but the song doesn't start at the first time i have to do /radio twice and select the same song to play it.
Please help me fix it.
This are the codes for the box which comes when i do /radio.
Код:
if(dialogid == DIALOG_RADIO)
	{
	    if(response)
	    {
		    switch(listitem)
		    {
		        case 0:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ojnhq70h46/Double_Take.mp3");
		        }
		        case 1:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/p3sbf5iu31/A_billion_Hits.mp3");
		        }
		        case 2:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/d1pzlpxv7u/Better_Together.mp3");
		        }
		        case 3:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/rjv4pfvrtu/Don_t_look_down-Austin_and_Ally.mp3");
		        }
		        case 4:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/jziiv86g1v/Can_t_Do_it_Without_you.mp3");
		        }
		        case 5:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/mp2uovns9w/The_way_that_you_do.mp3");
		        }
		        case 6:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/margbszuyb/it_s_me_it_s_you.mp3");
		        }
		        case 7:
		        {
		            PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7dbhudh549/ross-lynch-who-i-am-austin-and-ally.mp3");
				}
				case 8:
				{
				    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ve3girvgyq/Not_a_Love_Song.mp3");
				}
				case 9:
				{
					StopAudioStreamForPlayer(playerid);
				}
			}
		}
	}
Reply
#2

Well, You need to wait like 1 minute to let it start OR use this:

pawn Код:
if(dialogid == DIALOG_RADIO)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ojnhq70h46/Double_Take.mp3");
                PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ojnhq70h46/Double_Take.mp3");
                }
Reply
#3

Nope doesn't help. When I do that the song plays 2 at the same time.

(Sorry For My English)
Reply
#4

pawn Код:
if(dialogid == DIALOG_RADIO)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ojnhq70h46/Double_Take.mp3");
                }
                case 1:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/p3sbf5iu31/A_billion_Hits.mp3");
                }
                case 2:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/d1pzlpxv7u/Better_Together.mp3");
                }
                case 3:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/rjv4pfvrtu/Don_t_look_down-Austin_and_Ally.mp3");
                }
                case 4:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/jziiv86g1v/Can_t_Do_it_Without_you.mp3");
                }
                case 5:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/mp2uovns9w/The_way_that_you_do.mp3");
                }
                case 6:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/margbszuyb/it_s_me_it_s_you.mp3");
                }
                case 7:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7dbhudh549/ross-lynch-who-i-am-austin-and-ally.mp3");
                }
                case 8:
                {
                    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ve3girvgyq/Not_a_Love_Song.mp3");
                }
                case 9:
                {
                    StopAudioStreamForPlayer(playerid);
                }
                             return 1;
            }
        }
    }
Reply
#5

#define DIALOG_RADIO 2


case DIALOG_RADIO:
{
if(response)
{
switch(listitem)
{
case 0: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/11843/Drake%20-%20All%20Me%20(Feat.%202%20Chainz%20%20Big%20Sean) .mp3");
case 1: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/11926/07%20From%20Time%20-%20(www.SongsLover.pk).mp3");
case 2: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/10034/Drake%20-%20Wu-Tang%20Forever%20-%20(www.SongsLover.pk).mp3");
case 3: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/8034/Tyga%20Feat%20Chris%20Brown%20-%20For%20The%20Road%20(www.SongsLover.pk).mp3");
case 4: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/10389/09-dj_khaled-no_new_friends_(feat._drake_rick_ross_lil_wayne)%2 0-%20(www.SongsLover.com).mp3");
case 5: PlayAudioStreamForPlayer(playerid,"http://www.woo55.pk/adata/5529/PSY%20-%20Gangnam%20Style%20(www.SongsLover.pk).mp3");
case 6: PlayAudioStreamForPlayer(playerid,"Radio Stoped");
}
}
}




CMD:radio(playerid)
{
SendClientMessage(playerid, COLOR_RED,"Make sure your RADIO VOLUME is max!!! Else the radio won't work!");
new string[256];
strcat(string,"{FF0000}ALL ME - Pjanoo\n{00FF00}FROM TIME\n{0000FF}WU TANG FOREVER\nTYGA THE ROADn\n{00FF00}NO NEW FRIENDS\nGangnam Style\nStop Radio\n");
ShowPlayerDialog(playerid,DIALOG_RADIO,DIALOG_STYL E_LIST,"Select an radio!",string,"Select","Close");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)