02.02.2018, 11:37
This will work:
PHP код:
CMD:admins(playerid, params[])
{
new online;
for(new i = 0; i < MAX_PLAYERS; i++)
{
new level[512], string[256], lel[23];
if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0)
{
format(lel, sizeof(lel), "%d", online);
SendClientMessageToAll(ADMIN, lel);
switch(PlayerInfo[i][pAdmin])
{
case 1: level = "Administrбtor-kandidбt";
case 2: level = "Administrбtor";
case 3: level = "Vedoucн Administrбtor";
case 4: level = "Hlavnн Administrбtor";
case 5: level = "Sprбvce serveru";
}
format(string, sizeof(string), "%s %s {FFCC00}/pm %d <sem vpiљte vбљ dotaz>\n", GetName(i), level, i);
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Online administrбtori", string, "Ok", "");
online ++;
}
}
if(online==0) return ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Online administrбtori", "No online administrбtori", "Ok", "");
return 1;
}