15.05.2018, 21:10
Bom pessoal eu criei esse sistema de ver os adm's onlines em dialog, mas na dialog quando a 6 ou mais adm's online so aparece 5 na dialog alguem sabe pq isso acontece?
Agradeзo a ajuda. Obrigado pela atenзгo.
================================================== ======
"Ainda vou ver muita gente se arrependendo pelo que me fez e falou. Hoje vocк me pisa,
amanhг eu te atropelo..."
Brasil Virtual World™ ® RPG: 192.95.23.88:7777
PHP код:
if(strcmp(cmd, "/admins", true) == 0)
{
new count = 0;
new strcmd[1000];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(file, sizeof(file), PASTA_ADMINS, GetPlayerNameEx(i));
if(dini_Int(file, "ALevel") == 7)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ DONO™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ DONO™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 6)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - DONO™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - DONO™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 5)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ GERENTE™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ GERENTE™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 4)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ ADMINISTRADOR™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ ADMINISTRADOR™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 3)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - ADMINISTRADOR™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - ADMINISTRADOR™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 2)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AJUDANTE™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AJUDANTE™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
else if(dini_Int(file, "ALevel") == 1)
{
if(AFK[i] == 0)
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AUXILIAR™ ]\t\t{00FF00}[ ON ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
else
{
format(strcmd, sizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AUXILIAR™ ]\t\t{FF0000}[ OFF ]\n", GetPlayerNameEx(i), i);
strcat(string, strcmd, sizeof(string));
}
}
count++;
}
}
if(count == 0)
{
ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, "{FFFFFF}ADM's Online [ {FF0000}0{FFFFFF} ]", "{FF0000}Nгo hб menbros da Administraзгo Online", "OK", "");
}
else
{
new msg[150], strcount[1000];
format(msg, sizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]", count);
strcat(strcount, msg, sizeof(strcount));
ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, strcount, string, "OK", "");
}
return 1;
}
================================================== ======
"Ainda vou ver muita gente se arrependendo pelo que me fez e falou. Hoje vocк me pisa,
amanhг eu te atropelo..."
Brasil Virtual World™ ® RPG: 192.95.23.88:7777