ShowPlayerDialog
#1

Command:

CMD:tog(playerid, params[]) {
new szDialog[1024], szDialog2[1024];
strcat(szDialog2, "Optiune\tStatus\n");
if(PlayerInfo[playerid][pNewbieEnabled] == 0) format(szDialog, 1024, "Newbie chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Newbie chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gFam[playerid] == 0) format(szDialog, 1024, "Faction Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Faction Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(togfind[playerid] == 0) format(szDialog, 1024, "Find\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Find\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(WTToggle[playerid] == false) format(szDialog, 1024, "Walkie Talkie\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Walkie Talkie\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gNews[playerid] == 0) format(szDialog, 1024, "News\t{3BBF0B}activat\n");
else format(szDialog, 1024, "News\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(HidePM[playerid] == 0) format(szDialog, 1024, "Whisper\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Whisper\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(toglc[playerid] == 0) format(szDialog, 1024, "Leader Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Leader Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
}
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
}

Error: error 021: symbol already defined: "ShowPlayerDialog"
Reply
#2

help ?
Reply
#3

You closed the bracket before you wrote
Code:
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
change your code to this:
Code:
CMD:tog(playerid, params[]) {
new szDialog[1024], szDialog2[1024];
strcat(szDialog2, "Optiune\tStatus\n");
if(PlayerInfo[playerid][pNewbieEnabled] == 0) format(szDialog, 1024, "Newbie chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Newbie chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gFam[playerid] == 0) format(szDialog, 1024, "Faction Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Faction Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(togfind[playerid] == 0) format(szDialog, 1024, "Find\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Find\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(WTToggle[playerid] == false) format(szDialog, 1024, "Walkie Talkie\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Walkie Talkie\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gNews[playerid] == 0) format(szDialog, 1024, "News\t{3BBF0B}activat\n");
else format(szDialog, 1024, "News\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(HidePM[playerid] == 0) format(szDialog, 1024, "Whisper\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Whisper\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(toglc[playerid] == 0) format(szDialog, 1024, "Leader Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Leader Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)