12.04.2017, 21:39
UPDATED CODE:
PHP код:
CMD:admins(playerid, params[])
{
new adminstring[256],tempstr[128], admins = 0;
for (new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
format(tempstr, sizeof(tempstr),"{FFFFFF}%s {FFFF00}[ID:%d]{FFFFFF}\n", PlayerName(i), i);
strcat(adminstring, tempstr, sizeof(adminstring));
admins++;
}
}
}
if(admins > 0) {
ShowPlayerDialog(playerid,DIALOG_ONLINEADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
} else {
SendClientMessage(playerid, 0xFF0000FF, "No admins online")
}
return 1;
}