20.06.2012, 16:26
Alright, I've been working really hard on my new radio system, as I've decided to create it as Dialogs, so I created two dialogs (I will show code later) as the first dialog shows, but the second does not show up at all.
Here are the codes.
At the first, I've added this:
And then, I've added this command (I'm using ZCMD):
And, I've added these too (The dialogs):
I guess there's no errors in them, but when I go ingame, I type the command which is /playradio, the first dialog shows up(9312) as I click on 'Radio Channels' so the the other dialog would show up (9313) as nothing happens when I click on it, I need help ASAP please.
Here are the codes.
At the first, I've added this:
pawn Код:
// Radio Station
#define RADIOSTATIONMENU 9312
#define MUSICSTATIONS 9313
pawn Код:
CMD:playradio(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " In-case you want to turn the radio on, you have to be in a vehicle!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid, 9312, DIALOG_STYLE_LIST, "Radio Station", "Radio Channels\nTurn the music off", "Select", "Cancel");
}
return 1;
}
pawn Код:
if(dialogid == 9313)
{
if(response)
{
if(listitem == 0)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.230:8002/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 1)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.229:8004/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 2)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.228:8002/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 3)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.229:8006/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 4)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.229:8042/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 5)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.225:8022/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 6)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://205.188.215.229:8040/listen.pls");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
if(listitem == 7)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=357703");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 8)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1026951");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
if(listitem == 9)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057543");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 10)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1543115");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 11)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 12)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283516");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 13)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=737152");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 14)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=259629");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 15)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1193516");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
return 1;
}
if(listitem == 16)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 10.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1878");
SendClientMessageEx(playerid, COLOR_WHITE, "Music started!");
}
return 1;
}
}
}
if(dialogid == 9312)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 9313, DIALOG_STYLE_LIST, "Choose the channel you would like to listen!", "977 The Hitz Channel\n977 The 80s Channel\n181.FM - POWER 181\n1POWER\n108.FM - THE HITLIST\nChroniX Metal\nHOT 108 JAMZ\nSpart FM Tupac Channel\nAlex Jones FM\nFrench Kiss FM\nBlackBeat FM\nDEFJAY\nPower Hitz\nSky FM\nOld School 99\nTrance Channel\nIbiza Sonica", "Select", "Cancel");
}
if(listitem == 1)
{
StopAudioStreamForPlayer(playerid);
}
return 1;
}
}
}


