if(dialogid == 1555) { if(!response) { SendClientMessage(playerid,red,"Canceled."); } else if(response) { switch(listitem) { case 0: { if (Zone[AIRPORT] == TEAM_ZONE_JAPAN_COLOR); SendClientMessage(playerid, green,"Succes Spawn There"); } else return SendClientMessage(playerid, COLOR_RED,"You Are Not Japan"); } } }
error 036: empty statement 002: only a single statement (or expression) can follow each "case"
if(dialogid == 1555)
{
if(!response)
{return SendClientMessage(playerid,red,"Canceled.");}
if(response)
{
switch(listitem)
{
case 0:
{
if (Zone[AIRPORT] == TEAM_ZONE_JAPAN_COLOR){
SendClientMessage(playerid, green,"Succes Spawn There");
}
else return SendClientMessage(playerid, COLOR_RED,"You Are Not Japan");
}
}
}
}
pawn Код:
|
if(dialogid == 1555)
{
if(!response)
{
SendClientMessage(playerid,red,"Canceled.");
}
else if(response)
{
switch(listitem)
{
case 0:
{
if(Zone[AIRPORT] == TEAM_ZONE_JAPAN_COLOR)
{
SendClientMessage(playerid, green,"Succes Spawn There");
}
}
default: SendClientMessage(playerid, COLOR_RED,"You Are Not Japan");
}
}
}
ShowPlayerDialog(playerid, DIALOG_TEST, DIALOG_STYLE_LIST, "Select a Location", "Some Location\nAnother Location\nCancel", "Select", "Cancel")
if(dialogid == DIALOG_TEST)
{
switch(listitem)
{
case 0: SetPlayerPos(playerid, 5.0, 4.0, 3.0); // Would be listitem 0, A.K.A "Some Location"
case 1: SetPlayerPos(playerid, 15.0, 14.0, 13.0); // Would be listitem 1, A.K.A "Another Location"
default: return 1; // Would be listitem 2, A.K.A "Cancel"
}
}