if(strcmp(cmd,"/radio", true) == 0) { ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit"); return 1; }
if(dialogid == 102) // { if(response) { for(new i=0; i<250; i++) { if(IsPlayerConnected(i)) { PlayAudioStreamForPlayer(i, inputtext); } } } }
#define DIALOGRADIO 1000
if(strcmp(cmd,"/radio", true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
}
------------------------------------------------------------------------------------------------------------
if(dialogid == DIALOGRADIO) //
{
if(response)
{
for(new i=0; i<250; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, inputtext);
}
}
}
}
return 1;
}
pawn Код:
|
#define DIALOGRADIO 102
I think it's supose to be like this:
Код:
#define DIALOGRADIO 102 |
#define RADIODIALOG 84555
if(strcmp(cmd,"/radio", true) == 0)
{
ShowPlayerDialog(playerid, RADIODIALOG , DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
}
if(dialogid == RADIODIALOG ) //
{
//rest of code...
return 1;
}
if(strcmp(cmd,"/radio", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameShark] >= 1) { ShowPlayerDialog(playerid, RADIODIALOG , DIALOG_STYLE_INPUT, "Muzika","{FFFFFF}Vnesete go {009BFF}Linkot{FFFFFF} od radio stanicata:", "Ok", "Izlezi"); } else { SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GR ESKA:{FFFFFF}Ne ste Ovlasteni za Ovaa Komanda."); } return 1; } |
if(dialogid == RADIODIALOG) // { if(response) { if(IsPlayerConnected(playerid)) { PlayAudioStreamForPlayer(playerid, inputtext); } return 1; } } |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == RADIODIALOG) //
{
if(response)
{
if(IsPlayerConnected(playerid))PlayAudioStreamForPlayer(playerid, inputtext);
}
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == RADIODIALOG && response) PlayAudioStreamForPlayer(playerid,inputtext);
}