13.10.2012, 11:53
Surround the case with { }
pawn Код:
case BIGEARS3:
{ // open case
if(response) {
BigEar[playerid] = 5;
BigEarFamily[playerid] = listitem;
SendClientMessageEx(playerid, COLOR_WHITE, "You will now hear all messages from this family's chat.");
}
else ShowPlayerDialog(playerid, BIGEARS, DIALOG_STYLE_LIST, "Please choose an item to proceed", "Global Chat\nOOC Chat\nIC Chat\nFaction Chat\nFamily Chat\nPlayer\nDisable Bigears", "Select", "Cancel");
case BIGEARS: if(response) switch(listitem) {
case 0: {
BigEar[playerid] = 1;
SendClientMessage(playerid, COLOR_WHITE, "You have selected the Global Chat, you can now see all the messages server-wide.");
}
case 1: {
BigEar[playerid] = 2;
SendClientMessage(playerid, COLOR_WHITE, "You have selected the OOC Chat, you can now see all the OOC(/b) messages server-wide.");
}
case 2: {
BigEar[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, "You have selected the IC Chat, you can now see all the IC(Includes /me's & /do's) messages server-wide.");
}
case 3: {
ShowPlayerDialog(playerid, BIGEARS2, DIALOG_STYLE_LIST, "{3399FF}Please choose an item to proceed", "LSPD\nFBI\nSFPD\nFDSA\nJudicial System\nState Government\nSASD\nHitman Agency\nSANews\nSan Andreas Department of Transportation\nSAAS\nTierra Robada\nNOOSE", "Select", "Cancel");
}
case 4: {
new bigstring[512];
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
format(bigstring, sizeof(bigstring), "%s%s\n",bigstring,FamilyInfo[i][FamilyName]);
}
ShowPlayerDialog(playerid, BIGEARS3, DIALOG_STYLE_LIST, "{3399FF}Please choose an item to proceed", bigstring, "Select", "Back");
}
case 5: {
ShowPlayerDialog(playerid, BIGEARS4, DIALOG_STYLE_INPUT, "{3399FF}Big Ears Player", "Please type in the name or the Id of the person you want to use the Big Ears function", "Select", "Back");
}
case 6: {
BigEar[playerid]= 0;
BigEarFaction[playerid] = 0;
BigEarPlayer[playerid] = INVALID_PLAYER_ID;
BigEarFamily[playerid] = 255;
SendClientMessage(playerid, COLOR_WHITE, "You have disabled the bigears feature, you no longer see anything on your screen.");
}
}
} // close