Names colors
#3

Just use this very simple /changecolor command.


Код:
  if(strcmp(cmd, "/changecolor", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SendClientMessage(playerid, COLOR_LIGHTRED, "COLORS: /red - this makes your name color red");
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "COLORS: /lightblue - this makes your name color light blue")
			SendClientMessage(playerid, COLOR_DBLUE, "COLORS: /darkblue - this makes your name color dark blue")
			SendClientMessage(playerid, COLOR_WHITE, "COLORS: /white - this makes your name color white")
			SendClientMessage(playerid, COLOR_YELLOW, "COLORS: /yellow - this makes your name color yellow")
			SendClientMessage(playerid, COLOR_GREEN, "COLORS: /green - this makes your name color green")
			SendClientMessage(playerid, TEAM_BALLAS_COLOR, "COLORS: /purple - this makes your name color purple")			
    }
		return 1;
	}
	if(strcmp(cmd, "/red", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_LIGHTRED);	
			SendClientMessage(playerid, COLOR_LIGHTRED, "Your name color has been successfully changed to red");			
    }
		return 1;
	}		
	if(strcmp(cmd, "/lightblue", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_LIGHTBLUE);	
			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your name color has been successfully changed to light blue");			
    }
		return 1;
	}
	if(strcmp(cmd, "/darkblue", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_DBLUE);	
			SendClientMessage(playerid, COLOR_DBLUE, "Your name color has been successfully changed to dark blue");			
    }
		return 1;
	}		
	if(strcmp(cmd, "/white", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_WHITE);	
			SendClientMessage(playerid, COLOR_WHITE, "Your name color has been successfully changed to white");			
    }
		return 1;
	}	
	if(strcmp(cmd, "/yellow", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_YELLOW);	
			SendClientMessage(playerid, COLOR_YELLOW, "Your name color has been successfully changed to yellow");			
    }
		return 1;
	}		
	if(strcmp(cmd, "/green", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, COLOR_GREEN);	
			SendClientMessage(playerid, COLOR_GREEN, "Your name color has been successfully changed to green");			
    }
		return 1;
	}	
	if(strcmp(cmd, "/purple", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			SetPlayerColor(playerid, TEAM_BALLAS_COLOR);	
			SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Your name color has been successfully changed to purple");			
    }
		return 1;
	}
btw make sure you have this at the top of your script

Код:
#define COLOR_GREEN 0x33AA33AA
#define TEAM_BALLAS_COLOR 0xD900D3C8
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTRED 0xFF6347AA
Reply


Messages In This Thread
Names colors - by CJoao - 01.03.2008, 11:02
Re: Names colors - by Lenda - 01.03.2008, 11:15
Re: Names colors - by P1nd3r - 01.03.2008, 11:16
Re: Names colors - by stuntking14 - 15.05.2009, 22:26
Re: Names colors - by JaYmE - 16.05.2009, 00:01

Forum Jump:


Users browsing this thread: 1 Guest(s)