AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   TF2 Colourful chat messages (https://forums.alliedmods.net/showthread.php?t=66654)

_cyruss_ 02-05-2008 14:36

TF2 Colourful chat messages
 
1 Attachment(s)
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?

Nican 02-05-2008 15:56

Re: TF2 Colourful chat messages
 
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...

_cyruss_ 02-05-2008 16:20

Re: TF2 Colourful chat messages
 
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 ;)

p3tsin 02-06-2008 09:50

Re: TF2 Colourful chat messages
 
\x01 = normal
\x02 = team color in player name only IIRC (dont use it :wink:)
\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.

_cyruss_ 02-06-2008 16:26

Re: TF2 Colourful chat messages
 
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_ 02-10-2008 10:20

Re: TF2 Colourful chat messages
 
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

Nican 02-10-2008 10:44

Re: TF2 Colourful chat messages
 
Well, what you can do is instead of sending the text to all, send the text to each individual the way you want.

_cyruss_ 02-10-2008 11:16

Re: TF2 Colourful chat messages
 
Quote:

Originally Posted by Nican (Post 583690)
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!:)

bl4nk 02-17-2008 09:30

Re: TF2 Colourful chat messages
 
http://bl4nk.com/imgs/tf2_chat_colors1.jpg

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.

SwInGeR 02-28-2008 08:37

Re: TF2 Colourful chat messages
 
Quote:

How can you have different colours in your chat message like this, see screenshot attached
Where to take this plugin?


All times are GMT -4. The time now is 18:41.

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