Page 1 of 1

color in hudhint

Posted: Wed Nov 19, 2014 2:29 am
by 8guawong
is it possible to have colors in hudhint?? (csgo)

Syntax: Select all

HintText(message='\x04test').send()


don't work

Posted: Wed Nov 19, 2014 2:35 am
by satoon101
No, it is not. Only SayText and SayText2 have that type of capabilities.

Posted: Wed Nov 19, 2014 3:06 am
by 8guawong
satoon101 wrote:No, it is not. Only SayText and SayText2 have that type of capabilities.


ok since i saw some server with colored hint text with SM so was wondering bout SP



whats the differecne between SayText and SayText2???

Posted: Wed Nov 19, 2014 3:14 am
by satoon101
8guawong wrote:ok since i saw some server with colored hint text with SM so was wondering bout SP

Interesting, I hadn't seen that before. Well, if it is possible with SM, it is possible with SP. Do you have a link to the script that does that so we can take a look?


8guawong wrote:whats the differecne between SayText and SayText2???

http://forums.sourcepython.com/showthread.php?586&p=3062&viewfull=1#post3062

Posted: Wed Nov 19, 2014 3:47 am
by satoon101
I figured it out after a bit of searching. As far as I know, this only works in CS:GO:

Syntax: Select all

from events import Event
from messages import HintText

message = HintText(message="This is a <font color='#FF0000'>test</font> \n" +
"<font color='#00FF00'>This is another</font> <font color='#0000FF'>test</font>")

@Event
def player_say(game_event):
message.send()


Very interesting, thank you for bring this to our attention!!! I did just test this in CS:S, and verified it does not work for that game. I guess there could be other games it works for, but this is the first I have ever heard about this.

Posted: Wed Nov 19, 2014 4:06 am
by 8guawong
np
good job figuring it out :cool:

Posted: Wed Nov 19, 2014 4:59 am
by L'In20Cible
That's awesome! :)

Posted: Wed Nov 19, 2014 7:59 pm
by Doldol
Whoah! What about other html!?

Posted: Thu Nov 20, 2014 12:03 am
by 8guawong
test and tell us! :cool:

Posted: Thu Nov 20, 2014 3:21 pm
by Doldol
8guawong wrote:test and tell us! :cool:


I sadly don't have the space for a CS:GO dedi install.

Posted: Thu Nov 20, 2014 3:54 pm
by Predz
I did a bit of testing on this and a lot of HTML codes seem to work. However stuff like ability to hyperlink and display images is still a mystery to me.

A few codes I found that work. (<b>, <p>, <li>, <font>, <i>, etc)

To display text larger than 64 units. You will have to use <table> and construct a table with a width and height though. Otherwise the text won't display.

E.g. <font size='64'>Test Text</font>

UPDATE: Giving a table a background colour, will make no text appear at all.