Raised This Month: $32 Target: $400
 8% 

how to change the text color


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 04-30-2014 , 13:33   Re: how to change the text color
Reply With Quote #21

Quote:
Originally Posted by Powerlord View Post
...\x## is the way you write characters in C as their hexadecimal code.

\x00 is the same as \0 , the null character, which C uses to terminate strings.
figured as much.
Mitchell is offline
blaacky
Senior Member
Join Date: Oct 2012
Old 05-01-2014 , 03:36   Re: how to change the text color
Reply With Quote #22

PrintToChat(client, "\x02\x0AHello\x03, \x04World!");

I read that you need the first \x0<Random Character here> to make it work right.
blaacky is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-19-2014 , 15:25   Re: how to change the text color
Reply With Quote #23

Quote:
Originally Posted by Mitchell View Post
Well it looks like there is about 15 colors (not sure if \x00 does any color, prob not.)
Correction. There is 16 colors:
Mitchell is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 12-19-2014 , 17:38   Re: how to change the text color
Reply With Quote #24

mitchell can you screenshot all 16
PresidentEvil is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-19-2014 , 18:56   Re: how to change the text color
Reply With Quote #25

Quote:
Originally Posted by PresidentEvil View Post
mitchell can you screenshot all 16


0A and 0D are both a grayish blue, slightly different i think.
07 and 0F are both a soft red, 07 is slightly more red.

None of these colors match the player colors correctly (spec, ct, t)
Mitchell is offline
SanKen
Senior Member
Join Date: Oct 2012
Location: /var/logs
Old 12-22-2014 , 15:55   Re: how to change the text color
Reply With Quote #26

already how to get the color of the team? on sourcepawn in csgo
__________________
SanKen is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-22-2014 , 16:16   Re: how to change the text color
Reply With Quote #27

Quote:
Originally Posted by SanKen View Post
already how to get the color of the team? on sourcepawn in csgo
On most games, its \x03 when the message is a SayText2 message (such as team chat).

Not sure about CS:GO, though.

Edit: On a side note, \x01 is a game's "normal" color, which is different for each game. Orange on most games, white on TF2; DoD:S; and CS:GO, and yellow on L4D and L4D2.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-22-2014 at 16:25.
Powerlord is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-22-2014 , 16:37   Re: how to change the text color
Reply With Quote #28

Quote:
Originally Posted by SanKen View Post
already how to get the color of the team? on sourcepawn in csgo
I'll try a test of using SayText2 messages.
EDIT:
looks like:

So yeah \x03 still changes when it's used with a different client index.
An index of 0 (console) returns lavender.

Last edited by Mitchell; 12-22-2014 at 16:53.
Mitchell is offline
SanKen
Senior Member
Join Date: Oct 2012
Location: /var/logs
Old 12-23-2014 , 08:58   Re: how to change the text color
Reply With Quote #29

@Mitchell, you can share me your test script ?
__________________
SanKen is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-23-2014 , 18:48   Re: how to change the text color
Reply With Quote #30

Quote:
Originally Posted by SanKen View Post
@Mitchell, you can share me your test script ?
sure.. the stock for saytext2 was stolen from here
Attached Files
File Type: sp Get Plugin or Get Source (chatcolorstest.sp - 208 views - 2.2 KB)
Mitchell is offline
Reply



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 21:18.


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