Forum

> > CS2D > Scripts > Hudtxt change colors
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hudtxt change colors

4 replies
To the start Previous 1 Next To the start

old Hudtxt change colors

superpegamento
User Off Offline

Quote
I need that my hud text changes colors automatically

MY HUD:
1
2
3
4
addhook("second" , "hudtxt")
function hudtxt()
parse('hudtxt 1 "©255252211WT" 10 190')
end

old Re: Hudtxt change colors

Jynxxx
User Off Offline

Quote
1
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

Something like this.

old Re: Hudtxt change colors

superpegamento
User Off Offline

Quote
user Jynxxx has written
1
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

Something like this.


the hook fails

old Re: Hudtxt change colors

pbeloto
User Off Offline

Quote
1
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview