Jump to content

Home

NAME colors, enabled black, but dont want it abused!


NITEMARE

Recommended Posts

hey guys. i thought before my little test0r mod gets installed on our server i have to find a way to look cool. so i looked into the colors for the names. i found the line

 

			// don't allow black in a name, period
		if( ColorIndex(*in) == 8 ) {
			in++;
			continue;

 

but when i enable black it doesnt take much time for the specialists to find out how to make their stupd names black too. then i tried to add a new color code in the lines:

 

#define Q_COLOR_ESCAPE	'^'
// you MUST have the last bit on here about colour strings being less than 7 or taiwanese strings
register as colour!!!!
#define Q_IsColorString(p)	( p && *(p) == Q_COLOR_ESCAPE && *((p)+1) && *((p)+1) != Q_COLOR_ESCAPE &&
*((p)+1) <= '7' && *((p)+1) >= '0' )


#define COLOR_BLACK		'0'
#define COLOR_RED		'1'
#define COLOR_GREEN		'2'
#define COLOR_YELLOW	                '3'
#define COLOR_BLUE		'4'
#define COLOR_CYAN		'5'
#define COLOR_MAGENTA	                '6'
#define COLOR_WHITE		'7'
#define ColorIndex(c)	( ( (c) - '0' ) & 7 )

#define S_COLOR_BLACK	"^0"
#define S_COLOR_RED	"^1"
#define S_COLOR_GREEN	"^2"
#define S_COLOR_YELLOW	"^3"
#define S_COLOR_BLUE	"^4"
#define S_COLOR_CYAN	"^5"
#define S_COLOR_MAGENTA	"^6"
#define S_COLOR_WHITE	"^7"

extern vec4_t	g_color_table[8];

but im not getting to it if i just add black at the end with a secret number like 88 or such. tho i changed the max number to 128 and stuff. can somebody explain the code here. im sure people wanna know about how to mess around with colors. and btw how can we put back the names shadows like it was in 1.02?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...