Debriefing > Impressions & Feedback

Support for Source 2009's color codes

(1/2) > >>

StrikerMan780:
I wish to request support for the /x07 hex character (bell) that allows setting up of color codes of any color, like in Source 2009 games such as TF2. I request this because my server uses SourceMod, and a lot of the advertisements I have in the server are color coded. They end up showing up as say: "00FF00This is an announcent" rather than: "This is an announcement"

Troy:
Do you know about this article?

http://wiki.geshl2.com/index.php/HudColor

StrikerMan780:
I know about that, but still doesn't serve what I need. I need the x07 control character method to maintain compatibility with a lot of sourcemod plugins.

killermonkey:
Interesting... please show me what it looks like in entirety.

StrikerMan780:
Basically, you can enter the Bell Control Character (Hex: 0x07), and then a color code (ie: FF0000 for red) before the text you wish to color. You can use as many as these as you want in a string, and can be any color. In SourceMod, they are used by doing something like this (a piece of code from one of my plugins):    


--- Code: ---
PrintToChatAll("\x07222222[\x076000FFStrikerMod\x07222222] \x07FF0000Player In Blocked Group Detected \x07FFFFFF- \x07FF0000Name: \x07FFFF00%N \x07FFFFFF| \x07FF0000Group ID: \x07FFFF00%d", client, groupAccountID);

--- End code ---
In sourcemod, \x indicates that you're specifying an ASCII Hex index in your string.





Source 2009 games like HL2DM, TF2, and CS:Source will read these codes, but, GoldenEye: Source does not, so it ends up making a huge mess of the output.

Navigation

[0] Message Index

[#] Next page

Go to full version