Names colors
#1

script to

[PTZ] IS COLOR ORENGE

[] COLOR IS RED

ETC..

thenks
Reply
#2

?

Are u trying to make the Tag Collor different of the nick color ? (this is impossible lol)
Reply
#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
#4

who is link for download namecolors please tell me
Reply
#5

Not impossable,

if this is what you wanted:

it will make it so if you spawn with a tag in your name if it is found it will set your color to the tag color

pawn Код:
#include <a_samp>

#define MaxTags 5
new PlayerTags[MaxTags][] = {
    "[TAG1]",
    "[TAG2]",
    "[TAG3]",
    "[TAG4]",
    "[TAG5]"
};

new PlayerColors[MaxTags] = {
    0xE60000FF,
    0x1229FAFF,
    0x21DD00FF,
    0xFFFF00FF,
    0xF97804FF
};

main()
{
}

public OnPlayerConnect(playerid)
{
    new pName[30];
    GetPlayerName(playerid, pName, sizeof pName);
   
    for(new i = 0; i < MaxTags; i++)
    {
        if(strfind(pName, PlayerTags[i], false) != -1)
        {
            switch(i)
            {
            default:
            {
                    SetPlayerColor(playerid, PlayerColors[i]);
                    break;
            }
            }
        }
    }
}
Your welcome

Sorry i forgot what the colours are i think they are:

1: Red
2: Blue
3: Green
4: Dont Know
5: Yellow

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)