Raised This Month: $ Target: $400
 0% 

TF2 Colourful chat messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_cyruss_
Junior Member
Join Date: Dec 2006
Old 02-05-2008 , 14:36   TF2 Colourful chat messages
Reply With Quote #1

Hey guys,

How can you have different colours in your chat message like this, see screenshot attached

I know you can have red players have red output, and blue team blue messages, and spectators grey, but this was all at once to the whole server (not a specific player),

how can this be achieved?
Attached Thumbnails
Click image for larger version

Name:	colours.jpg
Views:	2092
Size:	94.4 KB
ID:	23399  
_cyruss_ is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 02-05-2008 , 15:56   Re: TF2 Colourful chat messages
Reply With Quote #2

For exemple (My bank plugin):

PHP Code:
PrintToChatAll("[NC] \x04[SM Bank]\x01 Admin has changed your money"); 
Output:
Code:
[SM Bank] Admin has changed your money
When you add the "\x**" byte, all letters in front of that will be a specific color

\x04 = green
\x01 = Normal color

I don't remember what \x02 and \x03 is... try it out...
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
_cyruss_
Junior Member
Join Date: Dec 2006
Old 02-05-2008 , 16:20   Re: TF2 Colourful chat messages
Reply With Quote #3

Hmm thanks!

Yep I knew there was \x01 but i thought it was just gray and a couple of different greens, didn't know you could get red and blue etc.. with that also

i will play around with it to see if i can get other colours...

if anyone has a colourlist that'd be cool ;)
_cyruss_ is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 02-06-2008 , 09:50   Re: TF2 Colourful chat messages
Reply With Quote #4

\x01 = normal
\x02 = team color in player name only IIRC (dont use it )
\x03 = team color (ct = blue, terr = red, spec = grey, server = light green)
\x04 = green

For team colors you need to use the SayText usermessage cuz the color is dependant of the team the sender is on, except for light green of course.

EDIT: oh, this was for TF2... well you get the point.
__________________
plop

Last edited by p3tsin; 02-06-2008 at 09:52.
p3tsin is offline
_cyruss_
Junior Member
Join Date: Dec 2006
Old 02-06-2008 , 16:26   Re: TF2 Colourful chat messages
Reply With Quote #5

hmm yep i think i get it.. there seems to be a lot of greens in TF2, all different shades

so i take you can't use any colour you like, e.g. RGB values then.. only what Valve has built in game?

that kinda sucks.. booo valve ;)
_cyruss_ is offline
_cyruss_
Junior Member
Join Date: Dec 2006
Old 02-10-2008 , 10:20   Re: TF2 Colourful chat messages
Reply With Quote #6

Okay i've got this working now how I want it with SayText2

my next question is, is it possible to do a SayText2 (where you can use team colour messages) but have the text only show up for that team? so a team say message as opposed to a message everyone can see
_cyruss_ is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 02-10-2008 , 10:44   Re: TF2 Colourful chat messages
Reply With Quote #7

Well, what you can do is instead of sending the text to all, send the text to each individual the way you want.
__________________
http://www.nican132.com
I require reputation!

Last edited by Nican; 02-10-2008 at 11:35.
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
_cyruss_
Junior Member
Join Date: Dec 2006
Old 02-10-2008 , 11:16   Re: TF2 Colourful chat messages
Reply With Quote #8

Quote:
Originally Posted by Nican View Post
Well, you what you can do is instead of sending the text to all, send the text to each individual the way you want.
I understand, Thanks!
_cyruss_ is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-17-2008 , 09:30   Re: TF2 Colourful chat messages
Reply With Quote #9



You can achieve different results using SayText2() but I didn't feel like doing that at the time I took that screenshot. 07-09 do not appear btw.
bl4nk is offline
SwInGeR
Member
Join Date: Jan 2008
Location: Russia
Old 02-28-2008 , 08:37   Re: TF2 Colourful chat messages
Reply With Quote #10

Quote:
How can you have different colours in your chat message like this, see screenshot attached
Where to take this plugin?
SwInGeR 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 18:41.


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