issue with command that lists admins available
#5

Quote:
Originally Posted by Mo123
Посмотреть сообщение
Still doesn't work.

The admins doesn't stack in /admins, and only themselves are shown
Wait shit my bad, try this:
pawn Код:
CMD:admins(playerid)
{
    new bool:flag, str[128];
   
    SendClientMessage(playerid, COLOR_AQUA, "Administrators online:");
   
    foreach(new i:Player)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            flag = true;
             
            if(PlayerInfo[i][pAdmin] == KEY_ACTION)
                format(str, sizeof(str), "{00ff6b}[Paused]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
   
            else if(PlayerInfo[playerid][pAdminDuty] == 1)
                format(str, sizeof(str), "{00ff6b}[Available]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));

            else
                format(str, sizeof(str), "{FF0000}[Unavailable]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i));
                SendClientMessage(playerid, -1, str);
        }
    }

    if(!flag)
        SendClientMessage(playerid, -1, "There are no admins available currently.");
   
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)