Raised This Month: $51 Target: $400
 12% 

[CSGO] Team chat colors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 10-25-2015 , 22:23   [CSGO] Team chat colors
Reply With Quote #1

I have been trying to figure out how to get the team color for chat.

For example I am trying to printtoall: "Player1 headshot Player2" but I want the 'Player1' text color to be the team color.

The colors don't exist using the normal color codes as far as I can tell... but the GameMe plugin certainly has it working, and I am not sure how.

These are the only color codes that I know of.

white = "\x01"
red = "\x02"
purple = "\x03"
green = "\x04"
lightGreen = "\x05"
yellowGreen = "\x06"
lightRed = "\x07"
grey = "\x08"
yellow = "\x09"
orange = "\x10"
bman87 is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 10-25-2015 , 22:49   Re: [CSGO] Team chat colors
Reply With Quote #2

Blue = "x0C"

Something like this will work. Player1 and Player2 = client index
PHP Code:
if (GetClientTeam(Player1) == 3) {
PrintToChatAll("\x01 \x0C%N\x01 headshot \x02%N"Player1Player2);
} else {
PrintToChatAll("\x01 \x02%N\x01 headshot \x0C%N"Player1Player2);

__________________
versatile_bfg is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 10-26-2015 , 14:56   Re: [CSGO] Team chat colors
Reply With Quote #3

Look at this and this.

If you use {teamcolor} and author, it's gonna work just for one player. So the best way is to use {lightred} and {blue}.
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 10-26-2015 , 18:05   Re: [CSGO] Team chat colors
Reply With Quote #4

Excellent, thank you!
bman87 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:30.


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