pawn Код:
if(!strcmp(cmd, "/admins", true))
{
new
adml, adm, mdr, hlp, crg
;
new
stg2[1500]
;
strcat(stg2, "Nome\tCargo\tStatus\n");
foreach(Player, i)
{
if(BMO_GetInt(f(i), "AdminL") == 1)
{
if(aInfo[i][Oculto] == false)
{
adml ++;
format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{03FF35}Staff \t{00FF00}Online\n", PlayerName(i), i);
strcat(stg2, gStr);
}
}
else if(aInfo[i][Admin] == 1 && BMO_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
adm ++;
format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{1E90FF}Administrador(a) \t{00FF00}Online\n", PlayerName(i), i);
strcat(stg2, gStr);
}
}
else if(aInfo[i][Moderador] == 1 && BMO_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
mdr ++;
format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FF7F24}Moderador(a) \t{00FF00}Online\n", PlayerName(i), i);
strcat(stg2, gStr);
}
}
if(aInfo[i][Ajudante] == 1 && BMO_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
hlp ++;
format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FFFF00}Ajudante \t{00FF00}Online\n", PlayerName(i), i);
strcat(stg2, gStr);
}
}
if(aInfo[i][Corregedor] == 1 && BMO_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
crg ++;
format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{7D03FF}Corregedor(a) \t{00FF00}Online\n", PlayerName(i), i);
strcat(stg2, gStr);
}
}
}
new teste = crg+adml+adm+mdr+hlp;
if(teste == 0) return SendClientMessage(playerid, Vermelho, "| INFO ADMIN |{FFFFFF} Nгo hб Administradores (ADM) online no momento!");
format(hFile, sizeof(hFile), "{FFFFFF}•{FFFFFF} Admins Online [{03FF35} %d {FFFFFF}]",teste);
ShowPlayerDialog(playerid, 1447, DIALOG_STYLE_TABLIST_HEADERS, hFile, stg2, "Fechar", "");
return 1;
}