Admin (On Duty) HELP!
#1

Hello guys. May you please help me. Now the Admin On Duty system is like that:
When an admin is on duty, in /admins his name shows in yellow.
I would like to make it like that:
If the admin is Level 1 Moderator to show his name in green, instead of yellow. That is all.

Here is my /admins script:
Код:
if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
	        SendClientMessage(playerid, COLOR_WHITE,"__________________________________________________________");
	        SendClientMessage(playerid, COLOR_LIGHTYELLOW5,"                                Admins Online:     ");
			foreach (Player,i)
			{
				if(PlayerInfo[i][pHidden] == 0)
				{
				    if(PlayerInfo[i][pAdmin] >= 1)
				    {
				        new admtext[64];
				        if(PlayerInfo[i][pAdmin] == 10) { admtext = "Lead Administrator"; }
				        else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
				        else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level 4 Senior Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level 3 General Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 2)	{ admtext = "Level 2 Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level 1 Moderator"; }
						else if(PlayerInfo[i][pAdmin] == 11) { admtext = "Community Owner"; }
						else { admtext = "Level 1 Moderator"; }
						GetPlayerName(i, sendername, sizeof(sendername));
				        GiveNameSpace(sendername);
						if(PlayerInfo[i][pAdmin] == 12)
						{
							SendClientMessage(playerid, COLOR_LIGHTYELLOW5, "ONLINE: Admin [ID: 501]");
						}
						else if(strcmp(PlayerInfo[i][pAdmName], "No admins online.", true) == 0)
						{
							if(GetPVarInt(i, "AdminDuty") == 0)
							{
								format(string, sizeof(string), "ONLINE: %s: %s [ID: %d]", admtext, sendername, i);
								SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
							}
							else if(GetPVarInt(i, "AdminDuty") == 1)
							{
						    	format(string, sizeof(string), "ONLINE: %s: %s [ID: %d] (On duty)", admtext, sendername, i);
								SendClientMessage(playerid, COLOR_YELLOW, string);
							}
						}
						else
						{
							if(GetPVarInt(i, "AdminDuty") == 0)
							{
								format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d]", admtext, PlayerInfo[i][pAdmName], sendername, i);
								SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
							}
							else if(GetPVarInt(i, "AdminDuty") == 1)
							{
						    	format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d] (On duty)", admtext, PlayerInfo[i][pAdmName], sendername, i);
								SendClientMessage(playerid, COLOR_YELLOW, string);
							}
						}
					}
				}
			}
		}
		SendClientMessage(playerid, COLOR_WHITE,"__________________________________________________________");
		return 1;
	}
Reply
#2

try this
Quote:

f (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE,"_____________________________________ _____________________");
SendClientMessage(playerid, COLOR_LIGHTYELLOW5," Admins Online: ");
foreach (Player,i)
{
if(PlayerInfo[i][pHidden] == 0)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
new admtext[64];
if(PlayerInfo[i][pAdmin] == 10) { admtext = "Lead Administrator"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Lead Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level 4 Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level 3 General Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level 2 Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level 1 Moderator"; }
else if(PlayerInfo[i][pAdmin] == 11) { admtext = "Community Owner"; }
else { admtext = "Level 1 Moderator"; }
GetPlayerName(i, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[i][pAdmin] == 12)
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW5, "ONLINE: Admin [ID: 501]");
}
else if(strcmp(PlayerInfo[i][pAdmName], "No admins online.", true) == 0)
{
if(GetPVarInt(i, "AdminDuty") == 0)
{
format(string, sizeof(string), "ONLINE: %s: %s [ID: %d]", admtext, sendername, i);
SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
}
else if(GetPVarInt(i, "AdminDuty") == 1)
{
format(string, sizeof(string), "ONLINE: %s: %s [ID: %d] (On duty)", admtext, sendername, i);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else if(PlayerInfo[i][pAdmin] == 1)
{
if(GetPVarInt(i, "AdminDuty") == 0)
{
format(string, sizeof(string), "ONLINE: %s: %s [ID: %d]", admtext, sendername, i);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else if(GetPVarInt(i, "AdminDuty") == 1)
{
format(string, sizeof(string), "ONLINE: %s: %s [ID: %d] (On duty)", admtext, sendername, i);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
else
{
if(GetPVarInt(i, "AdminDuty") == 0)
{
format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d]", admtext, PlayerInfo[i][pAdmName], sendername, i);
SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
}
else if(GetPVarInt(i, "AdminDuty") == 1)
{
format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d] (On duty)", admtext, PlayerInfo[i][pAdmName], sendername, i);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else if(PlayerInfo[i][pAdmin] == 1)
{
if(GetPVarInt(i, "AdminDuty") == 0)
{
format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d]", admtext, PlayerInfo[i][pAdmName], sendername, i);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else if(GetPVarInt(i, "AdminDuty") == 1)
{
format(string, sizeof(string), "ONLINE: %s (%s): %s [ID: %d] (On duty)", admtext, PlayerInfo[i][pAdmName], sendername, i);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_WHITE,"_____________________________________ _____________________");
return 1;
}

I didnot test it.
Reply
#3

In order for us to provide you help, you would need to basivally give us the whole gamemode because there are other parts of your script that might have connections to it.
Reply
#4

Quote:
Originally Posted by [FSaF]Jarno
Посмотреть сообщение
In order for us to provide you help, you would need to basivally give us the whole gamemode because there are other parts of your script that might have connections to it.
Welll I dont think he needs to give all the lines. He just have to give some specfic lines. Giving all the lines will make 2 things taht make worst,
1) You spam the thread
2) Your script will be steal from some noob scripter
3) Even worst ban for spamming. (LOL)
Reply
#5

Quote:
Originally Posted by jaami
Посмотреть сообщение
Welll I dont think he needs to give all the lines. He just have to give some specfic lines. Giving all the lines will make 2 things taht make worst,
1) You spam the thread
2) Your script will be steal from some noob scripter
3) Even worst ban for spamming. (LOL)
It ain't spamming, and the variables/functions could be used elsewhere in the script and then we need all the information about it. Hard to explain...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)