08.11.2014, 12:04
Like I said, you need to use strcat and yet people are posting codes with only format *sigh*
Try that code, it's not tested.
pawn Код:
dcmd_admins(playerid,params[])
{
new count=0,string[128],rank[128], first, string2[40];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetInfo(i,"AdminLevel")>= 1)
{
if(first)
format(string, sizeof(string), "{FF02A7}%s (Lvl. %d)", AdminName(i),GetInfo(i,"AdminLevel"));
else
{
format(string2, sizeof(string2), "\n{FF02A7}%s (Lvl. %d)", AdminName(i),GetInfo(i,"AdminLevel"));
strcat(string, string2, sizeof(string));
}
count++;
}
}
if(count) ShowPlayerDialog(playerid, 5559, DIALOG_STYLE_MSGBOX, "Online administrator", string, "Close", "");
if (count == 0) SendClientMessage(playerid,LIGHTBLUE,"{FF02A7}[Admin]:{ffffff}There Are no Admins Online");
return 1;
}