It works identical as cs2d player's health. Its color is green if percentage is full and changes to red if it is low.
By stages : Green - Orange - Yellow - Red gradation.
Also it uses hudtxt without hudtxtcolorfade only using color code \169
I tried to make it but I have no great idea for this
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Pr = 100; function display() local r,g,b = convert(Pr) parse("hudtxt 0 \"\169"..r.. ""..g...""..b..""..Pr.."%\" 480 10 1") end function convert(percentage) local r, g, b -- no idea about this part ;( return r, g, b, end
It would be great if you give me the answer but I also appreciate you if you give me hint for solution.