zcmd /admins command
#3

You are printing the admin variable to the one who used the command instead of detected admins.
Try the following, I have colored the change with red

Код:
CMD:admins(playerid,params[])
	{
    new admins[1024], str[64], count;
    for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if (!IsPlayerConnected(i))continue;
        if (!PlayerInfo[i][pAdmin])continue;
        new admin[64];
        if(PlayerInfo[i][pAdmin] == 1) { admin = "ADMIN Level[ 1 ]"; }
       	else if(PlayerInfo[i][pAdmin] == 2) { admin = "ADMIN Level[ 2 ]"; }
       	else if(PlayerInfo[i][pAdmin] == 3) { admin = "ADMIN Level[ 3 ]"; }
       	else if(PlayerInfo[i][pAdmin] == 4) { admin = "ADMIN Level[ 4 ]"; }
       	else if(PlayerInfo[i][pAdmin] == 5) { admin = "HEAD ADMIN";}
        GetPlayerName(i, str, 24);
        format(str, sizeof(str), "{FFFFFF}Admin Level [ %i ] {FF0000}%s [ID:%d]\r\n", PlayerInfo[i][pAdmin], str, i);
        strcat(admins, str);
        count++;
    }
    if(!count)return SendClientMessage(playerid,-1,"{FF0000}Няма Онлайн Администратор!");
    ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "{00FF00}Онлайн админи", admins, "OK", "");
    return 1;
	}
Reply


Messages In This Thread
zcmd /admins command - by HellixBG - 15.07.2017, 10:53
Re: zcmd /admins command - by DarkBr - 15.07.2017, 12:37
Re: zcmd /admins command - by FailerZ - 15.07.2017, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)