AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [INC] CromChat - a better ColorChat! (https://forums.alliedmods.net/showthread.php?t=295046)

shehzad1234 03-17-2017 10:29

Re: [INC] CromChat
 
Quote:

Originally Posted by OciXCrom (Post 2504085)
@shehzad1234 - I think you should read all previous comments before suggesting it. :bee:

I updated the file in the first post and I think it's ready now. I changed the color symbols from !g to &x04. I don't want to use ^x04 style because this one can't be used inside ML/cfg/ini files. So I think the current one is the best solution.

&x07 = red
&x06 = blue
&x05 = white
&x04 = green
&x03 = team color
&x01 = normal


I also improved one more thing that bugged me - when I want to send a chat message and log it at the same time, I had to replace all color symbols in order to do it. So, I added CC_LogMessage, which will simultaneously send a chat message and log it.

oh i m verry sorry @OciXCrom :(

shehzad1234 03-17-2017 10:31

Re: [INC] CromChat
 
@OciXCrom can u replace

&x06 with ^6 only its easy

OciXCrom 03-17-2017 19:54

Re: [INC] CromChat
 
It's not easy at all and if you read the comments (again), you will see why.

shehzad1234 03-18-2017 05:33

Re: [INC] CromChat
 
ok bro :D

OciXCrom 03-18-2017 11:36

Re: [INC] CromChat
 
I added CC_RemoveColors function whicih will remove all chat and (or) menu colors from a message.
I also added a way to send a message without the prefix. Simply add &x00 in the beginning.

shehzad1234 03-18-2017 14:11

Re: [INC] CromChat
 
hmm bro :)

OciXCrom 05-26-2017 17:52

Re: [INC] CromChat
 
Added CC_SendMatched(id, iPlayer, szMessage[], any:...)
With this you can send a message that matches iPlayer's team color or use one of thee color arguments instead of a player id - CC_COLOR_[RED|BLUE|GREY|DEFAULT]. If a different color code is found in the message itself, it will switch to that color.

OciXCrom 10-16-2017 13:49

Re: [INC] CromChat
 
https://img.shields.io/badge/update-v1.3-green.svg
  • Added different combinations of color codes that can be activated with adding a single line of code in the .sma file. You can use codes like &x04, !g, {green}, {g}, ^4, or even create your custom ones. Read the first post for more information.

OciXCrom 11-30-2017 13:30

Re: [INC] CromChat
 
https://img.shields.io/badge/update-v1.4-green.svg
  • Added support for the ColorChat function. What this means? If a plugin is made using the standard ColorChat library and you want to change it to use CromChat, you can do that by simply changing the file in the #include line and everything else is automated.
  • In case someone wants to use both libraries at the same time (which I don't suggest), you can disable the support by adding #define CC_DONT_OVERWRITE_COLORCHAT before #include <cromchat>.
  • The same type of support is added for client_print_color. If you want to disable it, use CC_DONT_OVERWRITE_183_PRINT.
  • Added API documentation.

indraraj striker 12-16-2017 12:08

Re: [INC] CromChat
 
OciXCrom Thanks a lot for adding support to ColorChat, Now we don't need to replace each and every print chat with CromChat


All times are GMT -4. The time now is 10:34.

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