Admin Status
#6

Okay, let me help you, add on the PlayerInfo enum "Busy". Not sure if it works, because I did not test it!

Then replace the old astatus with this one:
Код:
CMD:astatus(playerid,params[])
{
    if(!PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(PlayerInfo[playerid][Busy] == 0)
    {
        Busy[playerid] = 1;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self busy on the staff list.");
    }
    else if(PlayerInfo[playerid][Busy] == 1)
    {
        Busy[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self Available on the staff list.");
    }
    return 1;
}
And then replace staff command with this one:

Код:
CMD:staff(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");

    SendClientMessage(playerid,COLOR_ORANGE, "Administrators:");
    foreach(Player, i)
    {
        if(PlayerInfo[i][pAdmin])
        if(PlayerInfo[i][Busy] == 0)
        {
                format(string, sizeof(string), "Name: %s Level: %d{1EFF00}(Available)", RPN(i),PlayerInfo[i][pAdmin]);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
        else if(PlayerInfo[i][Busy == 1)
        {
                format(string, sizeof(string), "Name: %s Level: %d{FF0000}(Busy)", RPN(i),PlayerInfo[i][pAdmin]);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
          }

    }
    SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
    foreach(Player, i)
    {
        if(PlayerInfo[i][pMod])
        if(PlayerInfo[i][Busy] == 0)
        {
                format(string, sizeof(string), "Name: %s{1EFF00}(Available)", RPN(i));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
        else if(PlayerInfo[i][Busy] == 1)
        {
                format(string, sizeof(string), "{FF0000}Name: %s(Busy)", RPN(i));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
		}
    SendClientMessage(playerid,COLOR_ORANGE, "Helpers:");
    foreach(Player, i)
    {
        if(PlayerInfo[i][pHelper])
        {
                format(string, sizeof(string), "Name: %s", RPN(i));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Admin Status - by lulo356 - 03.12.2014, 17:22
Re: Admin Status - by biker122 - 03.12.2014, 17:29
Re: Admin Status - by lulo356 - 03.12.2014, 17:45
Re: Admin Status - by lulo356 - 03.12.2014, 17:54
Re: Admin Status - by Write - 03.12.2014, 18:38
Re: Admin Status - by iManakoss - 03.12.2014, 18:38
Re: Admin Status - by lulo356 - 03.12.2014, 18:45

Forum Jump:


Users browsing this thread: 1 Guest(s)