CMD:admins(playerid, params[])
{
new count = 0;
{
if(jInfo[playerid][Logado] == true)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(jInfo[i][Cargo] > 0)
{
new StrAdmins[1000];
new Str1[128];
format(Str, sizeof(Str), "{FFFFFF}Administrador Online no Momento !\n");
format(Str1, sizeof(Str1), "{FFFFFF}[ %s {FFFFFF}] {FF8000}%s (%d) {FFFFFF}estб {00FF00}Online\n", LevelAdmin[jInfo[i][Cargo]], jNome(i), i);
strcat(StrAdmins, Str, 1000);
strcat(StrAdmins, Str1, 1000);
ShowPlayerDialog(playerid, DAdminsOnline, DIALOG_STYLE_MSGBOX, "{FFA500}Administradores", StrAdmins, "Fechar", "");
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;
}
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;
}
PHP Code:
|