Admin rank help and with /admins
#1

I want it if their admin level 1 - Moderator, Level 2 - Administrator, Level 3 - Junior Admin Level 4 - Senior Admin, Level 5 - Head Admin, Level 6 - Mapper, Level 7 - Scripter, Level 8 - Owner

And i want a cmd:admins command with the ranks above.

And how do i put admin rank in this?

Код:
CMD:givecash(playerid, params[])
{
    new id, money, string[128], string2[128],plName[24],aName[24];
	GetPlayerName(playerid,aName,sizeof(aName));
	GetPlayerName(id,plName,sizeof(plName));
    if(PlayerInfo[playerid][Level] >= 2)
    {
        if(sscanf(params,"ii",id,money)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /givecash [ID] [amount]");
        else
        GivePlayerMoney(id,money);
        CMDMessageToAdmins(playerid,"GIVECASH");
        PlayerPlaySound(id,1057,0.0,0.0,0.0);
        format(string, sizeof(string),"You have give player %s %d$!", plName, money);
        SendClientMessage(playerid, yellow, string);
        format(string2 ,sizeof(string2),"Administrator %s has given you %d$!", aName, money);
        SendClientMessage(id, blue, string2);
    }
    return 1;
}
Reply
#2

In that command you can't put rank you can only do as admin command..

About ranks you can make under playertext
EXAMPLE
pawn Код:
if(pInfo[playerid][Admin] == 1)
{
new admintext[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    format(admintext, sizeof (admintext), "{00FF00}[HELPER] {FFFFFF}%s: %s", name,text);
    SendClientMessageToAll(-1, admintext);
    return 0;
}
Reply
#3

pawn Код:
CMD:admins(playerid) {

    static
        playername[25],
        string[80],
        i;
       
    for(i = (GetMaxPlayers() - 1); i > -1; --i) {
        if(PlayerInfo[i][Level]) {
            GetPlayerName(i, playername, sizeof playername);
            switch(PlayerInfo[i][Level]) {
                case 1: string = "Moderator";
                case 2: string = "Administrator";
                case 3: string = "Junior Admin";
                case 4: string = "Senior Admin";
                case 5: string = "Head Admin";
                case 6: string = "Mapper";
                case 7: string = "Scripter";
                case 8: string = "Owner";
            }
           
            format(string, sizeof string, "Name: %s - Rank: %s", playername, string);
            SendClientMessage(playerid, -1, string);
        }
    }
   
    return 1;
}
This?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)