11.07.2015, 21:56
Hello! I have a problem, like the image shown below, the dialog skips a line and show what should be shown, over the first line of dialogue I get the error, how can I fix?
PHP код:
if (strcmp(cmd, "/admins", true) == 0)
{
new count = 0, dialog1[1000], adm[25];
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (AccountData[i][pAdmin] >= 0)
{
if (ModociaAdm3000[i] == 0)
{
switch (AccountData[i][pAdmDuty])
{
case 0:
{
if (AccountData[i][pAdmin] == 0)
{
format(adm, sizeof dialog1, "Moderador: %s [Trabalhando]\n", GetPlayerNameRP(i));
strcat(dialog1, adm, sizeof dialog1);
count++;
}
else if (AccountData[i][pAdmin] >= 1)
{
format(adm, sizeof dialog1, "Admin [%d]: %s [Trabalhando]\n", AccountData[i][pAdmin], GetPlayerNameRP(i));
strcat(dialog1, adm, sizeof dialog1);
count++;
}
}
case 1:
{
if (AccountData[i][pAdmin] == 0)
{
format(adm, sizeof dialog1, "Moderador: %s [Jogando]\n", GetPlayerNameRP(i));
strcat(dialog1, adm, sizeof dialog1);
count++;
}
else if (AccountData[i][pAdmin] >= 1)
{
format(adm, sizeof dialog1, "Admin [%d]: %s [Jogando]\n", AccountData[i][pAdmin], GetPlayerNameRP(i));
strcat(dialog1, adm, sizeof dialog1);
count++;
}
}
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "ERRO", "Nгo hб nenhum admin/moderador online", "Fechar", "");
}
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Administraзгo", dialog1, "Fechar", "");
return 1;
}