Raised This Month: $ Target: $400
 0% 

Fast question to DOD'ers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-13-2010 , 07:49   Fast question to DOD'ers
Reply With Quote #1

Does it support colored chat?
__________________
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-13-2010 , 08:15   Re: Fast question to DOD'ers
Reply With Quote #2

I see the name in the team color when I say something, so it seems yes.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-13-2010 , 08:55   Re: Fast question to DOD'ers
Reply With Quote #3

There should be a dod.txt or titles.txt like in cs, have a look in there to see colors codes.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 05-13-2010 , 09:12   Re: Fast question to DOD'ers
Reply With Quote #4

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:


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.
Attached Files
File Type: sma Get Plugin or Get Source (dod_adminchat.sma - 574 views - 12.5 KB)
File Type: sma Get Plugin or Get Source (dod_color_chat.sma - 608 views - 2.9 KB)
__________________
Impossible is Nothing

Last edited by Sylwester; 05-13-2010 at 11:40.
Sylwester is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-13-2010 , 17:39   Re: Fast question to DOD'ers
Reply With Quote #5

How did you figure all this out?


Here is something interesting using your adminchat version:


Note my full name is "|RIP| Fysiks |mR"
Attached Thumbnails
Click image for larger version

Name:	color_chat_length_test.png
Views:	304
Size:	59.4 KB
ID:	65629  
__________________
fysiks is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 05-13-2010 , 23:50   Re: Fast question to DOD'ers
Reply With Quote #6

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.
__________________
Impossible is Nothing
Sylwester is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-14-2010 , 00:02   Re: Fast question to DOD'ers
Reply With Quote #7

Quote:
Originally Posted by Sylwester View Post
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 View Post
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.
__________________
fysiks 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 03:44.


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