/staff (/admins) help
#1

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;
}
Reply
#2

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;
}
Reply
#3

thanks for your help!, it works
Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)