Hi,
can you elaborate a bit on how I can use a color directly in the plugin's translation file?
I mean the \x03 and \x02 or \x01 values - what is each's exact color representation?
Thanks!
Translation Colors
That depends on the game. For CS:GO:
http://forums.sourcepython.com/showthread.php?586&p=3062&viewfull=1#post3062
\x03 is the team color for the given index argument in every game I have ever used SayText2.
Also, for games that support it (as far as I know, only OrangeBox games), you can also use colors from the colors module (or custom Color objects). Just str() them, and it returns the hex representation of the color:
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors_wrap.cpp#L80
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors.h#L47
http://forums.sourcepython.com/showthread.php?586&p=3062&viewfull=1#post3062
\x03 is the team color for the given index argument in every game I have ever used SayText2.
Also, for games that support it (as far as I know, only OrangeBox games), you can also use colors from the colors module (or custom Color objects). Just str() them, and it returns the hex representation of the color:
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors_wrap.cpp#L80
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors.h#L47
satoon101 wrote:That depends on the game. For CS:GO:
http://forums.sourcepython.com/showthread.php?586&p=3062&viewfull=1#post3062
\x03 is the team color for the given index argument in every game I have ever used SayText2.
Also, for games that support it (as far as I know, only OrangeBox games), you can also use colors from the colors module (or custom Color objects). Just str() them, and it returns the hex representation of the color:
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors_wrap.cpp#L80
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/colors/colors.h#L47
Good to know, great. Thanks!
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 80 guests