06.11.2018, 10:18
Nгo testei, aqui compilou, use aн, teste, e veja se funciona
PHP Code:
CMD:admins(playerid, params[])
{
new cout, str[128], rankname[23];
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
switch(PlayerInfo[i][pAdmin])
{
case 1: rankname = "{FFFF00}Ajudante";
case 2: rankname = "{FF8000}Moderador";
case 3: rankname = "{00FFFF}Administrador";
case 4: rankname = "{AF30CF}Sub-Dono(a)";
case 5: rankname = "{26F321}Staff";
}
new name[24]; GetPlayerName(i, name, sizeof(name));
format(str, 128, "Admins:\tCargo:\n%s\t%s\n", name, rankname);
cout++;
}
}
}
if(cout == 0) ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins:", "No Online Admins", "Ok", "");
else
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_TABLIST_HEADERS, "Admins Online:", str, "Ok", "");
return 1;
}