Yup just did a test.
You can edit _scoreboard.gsc and change both g_TeamColor_Allies & g_TeamName_Axis to custom colors. You will see the changes in colors with both ^8 and ^9.
Printable View
Yup just did a test.
You can edit _scoreboard.gsc and change both g_TeamColor_Allies & g_TeamName_Axis to custom colors. You will see the changes in colors with both ^8 and ^9.
RGB is Red Green Blue. Use this site to find out the value you need:
http://www.rapidtables.com/web/color/RGB_Color.htm
http://www.webriti.com/wp-content/up...r-wheel-lg.jpg
HTML and Decimal support:
Examples:Code:setHtmlColor(code)
{
if(!isDefined(code) || isDefined(code) && (code[0]=="#" && code.size!=7 || code[0]!="#" && code.size!=6))
return (1,1,1);
if(code[0]=="#")
code=getSubStr(code,1,code.size);
hex=[];
for(i=0;i<code.size;i++)
hex[hex.size]=""+code[i];
for(i=0;i<hex.size;i++)
{
switch(toLower(hex[i]))
{
case "a":
hex[i]=10;
break;
case "b":
hex[i]=11;
break;
case "c":
hex[i]=12;
break;
case "d":
hex[i]=13;
break;
case "e":
hex[i]=14;
break;
case "f":
hex[i]=15;
break;
default:
hex[i]=int(hex[i]);
break;
}
}
r=(hex[0]*16)+hex[1];
g=(hex[2]*16)+hex[3];
b=(hex[4]*16)+hex[5];
return setDecimalColor((r,g,b));
}
setDecimalColor(rgb)
{
if(!isDefined(rgb))
return (1,1,1);
if(rgb[0]<0 || rgb[0]>255)
rgb[0]=255;
if(rgb[1]<0 || rgb[1]>255)
rgb[1]=255;
if(rgb[2]<0 || rgb[2]>255)
rgb[2]=255;
return (1/(255/rgb[0]),1/(255/rgb[1]),1/(255/rgb[2]));
}
Code:rgb=setHtmlColor("#1A1B1C");
setCvar("g_TeamColor_Allies", rgb[0]+" "+rgb[1]+" "+rgb[2]);
Have fun!^^Code:rgb=setHtmlColor("#1A1B1C");
new_hud=newHudElem();
new_hud.horzAlign="center_safearea";
new_hud.vertAlign="center_safearea";
new_hud.alignX="center";
new_hud.alignY="center";
new_hud.x=0;
new_hud.y=0;
new_hud.color=rgb;
new_hud.alpha=1;
new_hud setText(&"HUD Example");
Thanks.. but how to change color ^8 to it be some other color?
Dude... Do you even read the comments?
Quote:
You can edit _scoreboard.gsc and change both g_TeamColor_Allies & g_TeamName_Axis to custom colors. You will see the changes in colors with both ^8 and ^9.
OMG.. haven't read this 1 :D
HAHA its working!