25.07.2010, 15:12
Try this:
pawn Код:
if (strcmp(cmd, "/admins", true) == 0) // Admin list if they're online
{
new string[128];
new string1[1025];
new pname[MAX_PLAYER_NAME];
for(new i = 0; i < GetMaxPlayers(); i++)
{
GetPlayerName(i,pname,sizeof(pname));
if(AccountInfo[i][AdminLevel] > 0)
{
format(string1,sizeof(string1),"Name: %s Level: %d ID: %i",pname,AccountInfo[i][AdminLevel],i);
format(string,sizeof(string),"Admins Online\n\n%s\n",string1);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins",string,"Okay","Close");
}
else
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Admins","No administrators online","Okay","Close");
}
}
return 1;
}