AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Chat-Processor (Replacement for Simple Chat Processor) (https://forums.alliedmods.net/showthread.php?t=286913)

Drixevel 08-27-2016 12:34

[Any] Chat-Processor (Replacement for Simple Chat Processor)
 

Description:
This plugin and its API is meant to be a replacement for the old Simple Chat Processor (redux version) by fixing some bugs and adding new features to it. This plugin also uses the ColorVariables include to add additional features to the forwards for the plugin in order to automatically replace colors, remove colors, etc. This plugin uses a configuration file instead of a translation file for the format strings which allows for less translation files.

:: WARNING ::
This plugin is NOT meant to be ran alongside Simple Chat Processor(SCP) therefore you should either pick that SayText2 plugin or this one.

:: NOTE ::
This plugin is NOT a plugin which handles chat related changes, it's just an API plugin. Use HexTags which relies on this plugin to make those necessary changes.

ConVars:
  • sm_chatprocessor_status - 1 - Status of the plugin.
  • sm_chatprocessor_config - configs/chat_processor.cfg - Name of the message formats config.
  • sm_chatprocessor_process_colors_default - 1 - Default setting to give forwards to process colors.
  • sm_chatprocessor_remove_colors_default - 0 - Default setting to give forwards to remove colors.
  • sm_chatprocessor_strip_colors - 1 - Remove color tags from the name and the message before processing the output.
  • sm_chatprocessor_colors_flag - b - Flags required to use the color name and message. Needs sm_chatprocessor_strip_colors 1
  • sm_chatprocessor_deadchat - 1 - Controls how dead communicate.\n(0 = off, 1 = on)
  • sm_chatprocessor_allchat - 0 - Allows both teams to communicate with each other through team chat.\n(0 = off, 1 = on)
  • sm_chatprocessor_specchat - 1 - Allow spectators to chat to the teams or just to each other.\n(0 = off, 1 = on)
  • sm_chatprocessor_restrictdeadchat - 0 - Restricts all chat for the dead entirely.\n(0 = off, 1 = on)
  • sm_chatprocessor_addgotv - 1 - Add GOTV client to recipients list. (Only effects games with GOTV or SourceTV)
Special Thanks:
  • abrandnewday - recommendation and idea
  • Peace-Maker - format recommendations
  • SM9() - push requests and fixes for CSGO

Available 2013 Colors By Dr.McKay(TF2, CSS, ETC)

Available CSGO Colors:
https://github.com/PremyslTalich/Col...s.png?raw=true

Download | Repository | Download | Plugin Updates | Report Bugs | Donate

Drixevel 08-27-2016 12:35

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Example from the test plugin:

Code:

public Action CP_OnChatMessage(int& author, ArrayList recipients, char[] flagstring, char[] name, char[] message, bool& processcolors, bool& removecolors)
{
        Format(name, MAXLENGTH_NAME, "{red}%s", name);
        Format(message, MAXLENGTH_MESSAGE, "{blue}%s", message);
        return Plugin_Changed;
}

public void CP_OnChatMessagePost(int author, ArrayList recipients, const char[] flagstring, const char[] formatstring, const char[] name, const char[] message, bool processcolors, bool removecolors)
{
        PrintToServer("[TEST] %s: %s [%b/%b]", name, message, bProcessColors, bRemoveColors);
}

https://i.gyazo.com/0a199dbd612f92b2...d9dbeb2ede.png

sneaK 08-27-2016 12:49

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Nice release!

Is there a straightforward way to convert an existing plugin to use this instead of SCP?

Drixevel 08-27-2016 12:56

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Quote:

Originally Posted by blackhawk74 (Post 2448740)
Nice release!

Is there a straightforward way to convert an existing plugin to use this instead of SCP?

Just edit the forwards parameters, I kept the names the same. (That plus the include name)

Maxximou5 08-27-2016 12:56

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Great work man, looks like it will be super useful. Have some bacon, on me, free of charge. :bacon!:

HawkXD 08-27-2016 12:56

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Nice :D

Xzan 08-27-2016 13:11

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Nice work! Does it work for Sourcemod 1.7 ?

Drixevel 08-27-2016 13:11

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Quote:

Originally Posted by Xzan (Post 2448754)
Nice work! Does it work for Sourcemod 1.7 ?

Maybe, It's compiled and tested on 1.8 though.

shavit 08-27-2016 14:19

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
Pretty cool! Does the 'recipients' array actually work? Can I manipulate it and remove/add client indexes without having duplicates?

nhnkl159 08-27-2016 14:22

Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
 
i fucking love you..

great job ;)


All times are GMT -4. The time now is 07:31.

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