Textdraw colours
#1

Right I want somthing that shows 100% - 76% green 75% to 50% Yellow 49% to 0% Red Anyone have any idea's ?
Reply
#2

well you'll need a to check against a variable and then use another variable to store the color.

Код:
if(variable >= 0 && variable < 50) tdcolor = COLOR_RED;
else if(variable >= 50 && variable < 76) tdcolor = COLOR_YELLOW;
else if(variable >= 75 and variable <= 100) tdcolor = COLOR_GREEN;
TextDrawColor(TextDrawName, tdcolor);
Reply
#3

Thanks fella
Reply
#4

Not a problem. Just don't be a noob and copy/paste what I wrote. What I put down was a theory...you'll have to declare the variables and define the colors yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)