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

client_print with colors or team color?


Post New Thread Reply   
 
Thread Tools Display Modes
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-03-2005 , 20:33  
Reply With Quote #11

Damn got here too late..

They did this in adminlisten, didn't they?
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-03-2005 , 20:45  
Reply With Quote #12

I toldya!

Hehe.

Also, with addition write_bytes, you can write the color, at least in TS.

I suppose there must be other ways to do it too.

TS = 1
DS = 0
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
larnk
Member
Join Date: Dec 2004
Old 01-03-2005 , 22:21  
Reply With Quote #13

Quote:
Originally Posted by Damaged Soul
I did some searching around and came across this:

Code:
// Radio and chat strings can have control characters embedded to set colors.  For the control characters to be used, one must be at the start of the string.
// The control characters can be copied and pasted in notepad.
//  = 0x02 (STX) - Use team color up to the end of the player name.  This only works at the start of the string, and precludes using the other control characters.
//  = 0x03 (ETX) - Use team color from this point forward
//  = 0x04 (EOT) - Use location color from this point forward
//  = 0x01 (SOH) - Use normal color from this point forward
Some of those characters won't appear there. But its simple.

Code:
public plugin_init() {     register_clcmd("test","test") } public test(id) {     message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)     write_byte(id)     write_string("^x03Team colored text ^x01Normal color")     message_end()         return PLUGIN_HANDLED }

The team colored text will print in red if the entindex is of a player on the T team or blue if the entindex of a player on the CT team. Otherwise it will print in white. I also noticed if you use x^04 instead for the "location color", it will print in green text. So it seems you can print text in red, blue, white, or green. That's all that is available for CS anyways. The colors don't seem to work in anything else other than the SayText message, but I could be wrong about that.
Thank you very much. It works well.
Best regards.
larnk is offline
larnk
Member
Join Date: Dec 2004
Old 01-03-2005 , 23:43  
Reply With Quote #14

To Damaged Soul

It goes without saying that I appreciate that your have done.

Would you do me a favor to tell me where I can find the reference about hlds messages?
I have download some hl standard sdk, but I think it's no help to me..
thanks a lot
larnk is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-04-2005 , 00:41  
Reply With Quote #15

"Location color" refers to Counter-Strike: Condition Zero. When you say something, the location of where you are in the map appears in green next to your name.

I'm probably just getting my hopes up, but will the colors work for client_print, or only the SayText message?

Also, where did you get that information from?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-04-2005 , 00:43  
Reply With Quote #16

maybe it be possible to access client dll of every persons every time a message is send and change its apperance. might need some good hacking
Freecode is offline
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 01-04-2005 , 01:24  
Reply With Quote #17

Quote:
Originally Posted by larnk
Would you do me a favor to tell me where I can find the reference about hlds messages?
I have download some hl standard sdk, but I think it's no help to me..
thanks a lot
Typing 'meta game' in the console will give you a list of messages. I hate to mention it, but you could get more information about any message by using my Message Logging plugin if you'd like. That's probably the best way to get the information you'd need.


Quote:
Originally Posted by Freecode
maybe it be possible to access client dll of every persons every time a message is send and change its apperance. might need some good hacking
I don't think that would really be possible. The client DLL is on the client's machine. That's where it must interpret the 0x01-0x04 control codes into colors. The server doesn't have access to the code in the client's DLL. Maybe there's some other hidden function in the server DLL that will deal with colors, but that would take some hack work that I don't have time for right now because I've been trying to do some HL2 stuff. This topic made me investigate it on CSS too. I've been trying see how SayText works in that. The colors don't seem to work the same way and trying to send a SayText keeps cutting off one the characters. But that's besides the point.


Quote:
Originally Posted by XxAvalanchexX
"Location color" refers to Counter-Strike: Condition Zero. When you say something, the location of where you are in the map appears in green next to your name.

I'm probably just getting my hopes up, but will the colors work for client_print, or only the SayText message?

Also, where did you get that information from?
Yeah I figured as such with the location thing. And I also tried client_print already. Doesn't seem to work. I got the information from cstrike/resource/cstrike_english.txt. I had to pull it out of the GCF file.
__________________
エル・プサイ・コングルゥ
DS is offline
Old 05-01-2009, 19:15
sevoii
This message has been deleted by YamiKaitou. Reason: bump dead thread with an answer that was already given (your answer was wrong)
Old 05-01-2009, 19:16
DarkGod
This message has been deleted by YamiKaitou. Reason: reply to deleted post
Old 05-01-2009, 19:20
siffness
This message has been deleted by YamiKaitou. Reason: good for you
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 10:10.


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