String Colour
#1

Код:
//===================================Admins Colors=========================================//
#define Color_Server_Owner          0xAA3333AA  //Level 7
#define Color_Management_Admin      0x800080AA  //Level 6
#define Color_Head_Admin            0x33CCFFAA  //Level 5
#define Color_Lead_Admin            0x33AA33AA  //Level 4
#define Color_Administrator_Admin   0x24FF0AB9  //Level 3
#define Color_Junior_Admin          0x00F6F6FF  //Level 2
#define Color_Trial_Admin           0xFFFF00AA  //Level 1
//=============================================================================================//

CMD:admins(playerid,params[])
{
new count = 0, string[256], AdmRank[500];
	SendClientMessage(playerid,red,"");
	new ChangeColor;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][Level] > 0)
			{
				if(PlayerInfo[i][Level] == 1)
				{
					AdmRank = "Community Trial Admin";
					ChangeColor = Color_Trial_Admin;

				}
				else if(PlayerInfo[i][Level] == 2)
				{
					AdmRank = "Community Junior Admin";
					ChangeColor = Color_Junior_Admin;

				}
				else if(PlayerInfo[i][Level] == 3)
				{
					AdmRank = "Community Administrator";
					ChangeColor = Color_Administrator_Admin;

				}
				else if(PlayerInfo[i][Level] == 4)
				{
					AdmRank = "Community Lead Admin";
					ChangeColor = Color_Lead_Admin;

				}
				else if(PlayerInfo[i][Level] == 5)
				{
					AdmRank = "Community Head Admin";
					ChangeColor = Color_Head_Admin;

				}
				else if(PlayerInfo[i][Level] == 6)
				{
					AdmRank = "Community Management";
					ChangeColor = Color_Management_Admin;

				}
				else if(PlayerInfo[i][Level] >= 7)
				{
					AdmRank = "Community Owner";
                    ChangeColor = Color_Server_Owner;
				}
				new Name[MAX_PLAYER_NAME];
				GetPlayerName(i,Name,sizeof(Name));

				{
					format(string, sizeof(string), "Level: %d | Name: %s (ID:%i) | Rank: %s", PlayerInfo[i][Level], Name, i, AdmRank);
                    ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_MSGBOX, "{FF6600}Online Admins", string, "Close", "");
					count++;
				}
			}
		}
	}


	if(count == 0)
	ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_MSGBOX, "{FF6600}Online Admins", "No Administrator Online", "Close", "");
	return 1;
}
I Want to make the message in the dialog with the ChangeColour

Like If I Am Level 7 Admin Then It Should Show All The Text In The Colour Of Admin Level 7
Reply


Messages In This Thread
String Colour - by Speaker - 13.02.2017, 13:43
Respuesta: String Colour - by Eloy - 13.02.2017, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)