Hudtxt change colors
4 replies



05.07.13 02:42:16 am
I need that my hud text changes colors automatically
MY HUD:
MY HUD:
Code:
1
2
3
4
2
3
4
addhook("second" , "hudtxt")
function hudtxt()
parse('hudtxt 1 "©255252211WT" 10 190')
end
function hudtxt()
parse('hudtxt 1 "©255252211WT" 10 190')
end
Code:
1
2
3
4
5
6
2
3
4
5
6
table1 = {255000000, 255255255, 000255000, 255000255}
addhook("second", "hudtxt")
function hudtxt()
parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end
addhook("second", "hudtxt")
function hudtxt()
parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end
Something like this.

Code:
1
2
3
4
5
6
2
3
4
5
6
table1 = {255000000, 255255255, 000255000, 255000255}
addhook("second", "hudtxt")
function hudtxt()
parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end
addhook("second", "hudtxt")
function hudtxt()
parse('hudtxt 1 "©"..table1[math.random(1,4)].."WT" 10 190')
end
Something like this.
the hook fails
use
hudtxtcolorfade to change the hud color smoothy
use
hudtxt/
hudtxt2 to change the hud color directly

use




Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("second","_second")
function _second(id)
r = math.random(100,255)
g = math.random(100,255)
b = math.random(100,255)
parse('hudtxt 1 "WT" 10 190 1')
parse('hudtxtcolorfade 0 1 5000 '..r..' '..g..' '..b)
end
function _second(id)
r = math.random(100,255)
g = math.random(100,255)
b = math.random(100,255)
parse('hudtxt 1 "WT" 10 190 1')
parse('hudtxtcolorfade 0 1 5000 '..r..' '..g..' '..b)
end



