SA-MP Forums Archive
/staff (/admins) help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /staff (/admins) help (/showthread.php?tid=506863)



/staff (/admins) help - lulo356 - 14.04.2014

How can you create in the /staff that the admins from level 1 And 2 comes in the moderator section and from admin level 3 in the Admins
pawn Код:
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])
            {
                    format(string, sizeof(string), "Name:%s Level: %d", RPN(i),PlayerInfo[i][pAdmin]);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
        }
    SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin])
            {
                    format(string, sizeof(string), "Name:%s", 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;
}



Re: /staff (/admins) help - RenSoprano - 14.04.2014

pawn Код:
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] >= 3)
        {
                format(string, sizeof(string), "Name:%s Level: %d", RPN(i),PlayerInfo[i][pAdmin]);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
    }
    SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
    foreach(Player, i)
    {
        if(PlayerInfo[i][pAdmin] < 3)
        {
                format(string, sizeof(string), "Name:%s", 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;
}



Re: /staff (/admins) help - lulo356 - 14.04.2014

thanks for your help!, it works


Re: /staff (/admins) help - lulo356 - 18.04.2014

Normal player is now in the section moderators, how to fix this


Re: /staff (/admins) help - Bingo - 18.04.2014

Quote:
Originally Posted by lulo356
Посмотреть сообщение
Normal player is now in the section moderators, how to fix this
pawn Код:
if(PlayerInfo[i][pAdmin] <= 3)



Re: /staff (/admins) help - Konstantinos - 18.04.2014

Change to:
pawn Код:
// for moderators:
if(PlayerInfo[i][pAdmin] == 1 || PlayerInfo[i][pAdmin] == 2)