How to make Operators/Trainee Rank with LuxAdmin?
#1

Hi guys, I'm Uberanwar, I need a little help. Can someone tell me how to make Operators (trainee) rank with LuxAdmin? Operators (Trainee) can kick, warn and spectate only.

Quote:
Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        new ChangeColor;
  		SendClientMessage(playerid, green, " ");
        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
		SendClientMessage(playerid, green, " ");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
	 		if (IsPlayerConnected(i))
 			{
				if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
 				{
					if(AccInfo[i][Level] > 5)
					{
						AdmRank = "Professional Admin";
						ChangeColor = Color_Professional_Admin;
					}
 					if(IsPlayerAdmin(i))
				  	{
				  		AdmRank = "RCON Administrator";
				  		ChangeColor = Color_RCON_Administrator;
				  	}
				    else
				    {
				 		switch(AccInfo[i][Level])
						{
							case 1: {
							AdmRank = "Basic Moderator";
							ChangeColor = Color_Basic_Moderator;
							}
							case 2: {
							AdmRank = "Moderator";
							ChangeColor = Color_Moderator;
							}
							case 3: {
							AdmRank = "Master Moderator";
							ChangeColor = Color_Master_Moderator;
							}
							case 4: {
							AdmRank = "Administrator";
							ChangeColor = Color_Administrator;
							}
							case 5: {
							AdmRank = "Master Administrator";
							ChangeColor = Color_Master_Administrator;
							}
						}
					}
		 			switch(AccInfo[i][OnDuty])
					{
						case 0: AdmDuty = "Playing!";
						case 1: AdmDuty = "On Duty!";
					}
					format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
					SendClientMessage(playerid, ChangeColor, string);
					count++;
				}
			}
		}
		if (count == 0)
		SendClientMessage(playerid,red,"No admin online in the list");
		SendClientMessage(playerid, green, " _______________________________________");
		return 1;
}
Reply
#2

Can you post /admins code ?
Reply
#3

Alright. hold on. I'll edit this post

Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        new ChangeColor;
  		SendClientMessage(playerid, green, " ");
        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
		SendClientMessage(playerid, green, " ");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
	 		if (IsPlayerConnected(i))
 			{
				if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
 				{
					if(AccInfo[i][Level] > 5)
					{
						AdmRank = "Professional Admin";
						ChangeColor = Color_Professional_Admin;
					}
 					if(IsPlayerAdmin(i))
				  	{
				  		AdmRank = "RCON Administrator";
				  		ChangeColor = Color_RCON_Administrator;
				  	}
				    else
				    {
				 		switch(AccInfo[i][Level])
						{
							case 1: {
							AdmRank = "Basic Moderator";
							ChangeColor = Color_Basic_Moderator;
							}
							case 2: {
							AdmRank = "Moderator";
							ChangeColor = Color_Moderator;
							}
							case 3: {
							AdmRank = "Master Moderator";
							ChangeColor = Color_Master_Moderator;
							}
							case 4: {
							AdmRank = "Administrator";
							ChangeColor = Color_Administrator;
							}
							case 5: {
							AdmRank = "Master Administrator";
							ChangeColor = Color_Master_Administrator;
							}
						}
					}
		 			switch(AccInfo[i][OnDuty])
					{
						case 0: AdmDuty = "Playing!";
						case 1: AdmDuty = "On Duty!";
					}
					format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
					SendClientMessage(playerid, ChangeColor, string);
					count++;
				}
			}
		}
		if (count == 0)
		SendClientMessage(playerid,red,"No admin online in the list");
		SendClientMessage(playerid, green, " _______________________________________");
		return 1;
}
Reply
#4

Bump. Can anyone help me please?
Reply
#5

bump
Reply
#6

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        new ChangeColor;
        SendClientMessage(playerid, green, " ");
        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
        SendClientMessage(playerid, green, " ");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
                {
                    if(AccInfo[i][Level] > 5)
                    {
                        AdmRank = "Professional Admin";
                        ChangeColor = Color_Professional_Admin;
                    }
                    if(IsPlayerAdmin(i))
                    {
                        AdmRank = "RCON Administrator";
                        ChangeColor = Color_RCON_Administrator;
                    }
                    else
                    {
                        switch(AccInfo[i][Level])
                        {
                                                        /* Added Part All you do is move the case numbers up then add new case'es for the new ranks Admin is now level 6 Master Admin is now level 7 and down all i did is move them up */
                            case 1: {
                            AdmRank = "Trainee Assistant";
                            ChangeColor = Color_Basic_Moderator;
                            }
                            case 2: {
                            AdmRank = "Assistant";
                            ChangeColor = Color_Basic_Moderator;
                            }
                                                        /* Added Part End */
                            case 3: {
                            AdmRank = "Basic Moderator";
                            ChangeColor = Color_Basic_Moderator;
                            }
                            case 4: {
                            AdmRank = "Moderator";
                            ChangeColor = Color_Moderator;
                            }
                            case 5: {
                            AdmRank = "Master Moderator";
                            ChangeColor = Color_Master_Moderator;
                            }
                            case 6: {
                            AdmRank = "Administrator";
                            ChangeColor = Color_Administrator;
                            }
                            case 7: {
                            AdmRank = "Master Administrator";
                            ChangeColor = Color_Master_Administrator;
                            }
                        }
                    }
                    switch(AccInfo[i][OnDuty])
                    {
                        case 0: AdmDuty = "Playing!";
                        case 1: AdmDuty = "On Duty!";
                    }
                    format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
                    SendClientMessage(playerid, ChangeColor, string);
                    count++;
                }
            }
        }
        if (count == 0)
        SendClientMessage(playerid,red,"No admin online in the list");
        SendClientMessage(playerid, green, " _______________________________________");
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)