Raised This Month: $ Target: $400
 0% 

Inserting Hex code for text color


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 11-13-2018 , 18:47   Inserting Hex code for text color
Reply With Quote #1

What's the correct way to format this? I've tried several combinations of different things and nothing's working. I'm wanting to color the client's name the same color you see in in-game team chat (testing in L4D2). I know the color is 0x99CCFF .

I don't want to make a dependency on an include file - so I'd rather manually do this myself.

Code:
#define BLUE 0x99CCFF
PrintToChatAll("\x01\x07%06x%N \x01 : Test Message", BLUE, client);
Prints this:
99CCFFdustin : Test Message

I've tried inserting a decimal in various places in the '06' and also capitalizing the X after the 06 (Deathreus's suggestion) but I can't seem to get it working.

Edit: this is originally where I got the idea
https://forums.alliedmods.net/showpo...22&postcount=4

Last edited by dustinandband; 11-13-2018 at 18:48.
dustinandband is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode