Admin level/ranks
#1

Can someone tell me please how to change the chats so instead of Level 4 admin it says head admin?
Reply
#2

U mean make ranks?
Reply
#3

Just search level 4 admin and replace it with Head Admin. You also can admin color in chats ands admin commands like orange.
Reply
#4

Код:
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
  	new count, bool:online, string[128], AdminRank[70], name[24];
    for(new i,g=GetMaxPlayers(); i < g; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(1 <= pAdminLevel[i]/*<<<Change this var to yours*/ <= 99999)
            {


	                on‌line = true;
	                switch(pAdminLevel[i]) /*Change this var to yours*/
	                {
	                    case 1: AdminRank = "Moderator";
	                    case 2: AdminRank = "Junior Admin";
	                    case 3: AdminRank = "General Admin";
	                    case 4: AdminRank = "Senior Admin";
	                    case 1337: AdminRank = "Head Admin";
                        case 1338: AdminRank = "Scripter";
                        case 1339: AdminRank = "Head Scripter";
                        case 99998: AdminRank = "Co-Owner";
                        case 99999: AdminRank = "Owner";

	                }
	                GetPlayerName(i, name, sizeof(name));
	                format(string,sizeof(string), "%s %s [%s],",string, name, AdminRank);
	                count++;
	                if(count == 4)
	                {
	                    format(string,sizeof(string),"Admins: %s",string);
	                    SendClientMessage(playerid, -1, string);
	                    string = "";
	                    count = 0;
	                }

            }
        }
    }
    if(count)
    {
        format(string,sizeof(string),"Admins: %s",string);
        SendClientMessage(playerid, -1, string);
    }
    if(!online) SendClientMessage(playerid, -1,"No Admin online in the list.");
	return 1;
}
i did try this and i get like 4 errors from it

i tried changing "level 4 admin" like you said but thats not in the script
Reply
#5

Код:
if (strcmp(cmd, "/admins", true) ==0 )
		{
		    new count = 0;
			SendClientMessage(playerid, COLOR_BLUE, "----------[Online Staff Team]-----------");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 0)
				    {
						format(string, 256, "Admin %s (id: %d) - Off duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
						SendClientMessage(playerid, COLOR_WHITE, string);
						count++;
					}
					if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
				    {
						format(string, 256, "Admin %s (id: %d) - On duty.", GetPlayerNameEx(i), i, PlayerInfo[i][pAdmin]);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						count++;
					}
					if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 0)
				    {
						format(string, 256, "Moderator %s (id: %d) - Off duty.", GetPlayerNameEx(i), i);
						SendClientMessage(playerid, COLOR_WHITE, string);
						count++;
					}
					if(PlayerInfo[i][pModerator] >= 1 && AdminDuty[i] == 1)
				    {
						format(string, 256, "Moderator %s (id: %d) - On duty.", GetPlayerNameEx(i), i);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						count++;
					}
				}
			}
			if(count == 0)
			{
				SendClientMessage(playerid,COLOR_WHITE,"They're not staff members online.");
			}
			SendClientMessage(playerid, COLOR_BLUE, "----------------------------------------");
			return 1;
		}
This is what /admin code i have in the script at the moment
Reply
#6

So create a function which stores the admins name according to rank.
Reply
#7

Delete This... nvrm
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)