PHP Code:
CMD:admins(playerid)
{
new count = 0, StrAdmins[1000], str[120];
if(jInfo[playerid][Logado] == false) return 1;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(jInfo[i][Cargo] > 0)
{
format(str, sizeof(str), "{FFFFFF}[ %s {FFFFFF}] {FF8000}%s (%d) {FFFFFF}estб {00FF00}Online\n", LevelAdmin[jInfo[i][Cargo]], jNome(i), i);
strcat(StrAdmins, str);
count++;
}
}
}
if(count == 0)
{
format(str, sizeof(str), "{FF0000}Nenhum administrador Online no momento !");
ShowPlayerDialog(playerid, DAdminsOnline, DIALOG_STYLE_MSGBOX, "{FFA500}Administradores", str, "Fechar", "");
return 1;
}
ShowPlayerDialog(playerid, DAdminsOnline, DIALOG_STYLE_MSGBOX, "{FFA500}Administradores", StrAdmins, "Fechar", "");
return 1;
}