02.02.2018, 11:23
try.
PHP код:
CMD:admins(playerid, params[])
{
new online = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
online ++;
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бtoři", string, "Ok", "");
online++;
}
}
if(online == 0) return ShowPlayerDialog(playerid, DIALOG_NOADMINS, DIALOG_STYLE_MSGBOX, "Online administrбtoři", "Momentбlně na serveru nenн přнtomen ћбdnэ administrбtor", "Ok", "");
return 1;
}