AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fast question to DOD'ers (https://forums.alliedmods.net/showthread.php?t=126752)

xPaw 05-13-2010 07:49

Fast question to DOD'ers
 
Does it support colored chat?

Arkshine 05-13-2010 08:15

Re: Fast question to DOD'ers
 
I see the name in the team color when I say something, so it seems yes.

ConnorMcLeod 05-13-2010 08:55

Re: Fast question to DOD'ers
 
There should be a dod.txt or titles.txt like in cs, have a look in there to see colors codes.

Sylwester 05-13-2010 09:12

Re: Fast question to DOD'ers
 
2 Attachment(s)
I got a request to make it for dod and since I couldn't find any info about it on the internet, I made my own research and here are the results:

It works in a different way than in cs, and you can only use 1 color in 1 line. You can display msg in 1 of 5 colors:
http://fatcat.ftj.agh.edu.pl/%7Ei8sz...color_chat.PNG

As you can see on the image, non-default color chat lines have 62 characters length limit.

EDIT:
Name of player who sent the message is a terminator for color and the message must contain it or it will use default color. Team of player sending message defines color. First cell of array storing message must be set to 2
PHP Code:

new msg[128]
format(msg127"%c ...."2, ...) 

I edited default adminchat to add colors to it, and created another plugin (dod_color_chat.sma) that will always display name of admin using say or say_team in an unique color. Check them out.

fysiks 05-13-2010 17:39

Re: Fast question to DOD'ers
 
1 Attachment(s)
How did you figure all this out?


Here is something interesting using your adminchat version:
http://forums.alliedmods.net/attachm...1&d=1273786703

Note my full name is "|RIP| Fysiks |mR"

Sylwester 05-13-2010 23:50

Re: Fast question to DOD'ers
 
I simply tested every possibility I could thing about...

Everything is fine with that screenshot.
Like I said in my previous post, exact name of player is a terminator for color, so I decided to remove last letter from it, to make whole line appear in color. I also added player name at the end of the message (otherwise color would not work), but it's invisible due to 62 characters length limit.

In the 2nd message only name has unique color, because I thought that it's more important to display entire message, so it will be displayed like that if it's longer than 62 chars.

fysiks 05-14-2010 00:02

Re: Fast question to DOD'ers
 
Quote:

Originally Posted by Sylwester (Post 1179626)
Everything is fine with that screenshot.
Like I said in my previous post, exact name of player is a terminator for color, so I decided to remove last letter from it, to make whole line appear in color. I also added player name at the end of the message (otherwise color would not work), but it's invisible due to 62 characters length limit.

Oh, I get it now.

Quote:

Originally Posted by Sylwester (Post 1179626)
In the 2nd message only name has unique color, because I thought that it's more important to display entire message, so it will be displayed like that if it's longer than 62 chars.

Meh, Having a green name is good enough for me. It just has to get your attention. All green isn't as easy to read IMO.


All times are GMT -4. The time now is 03:44.

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