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

[Dyn Native] ColorChat v0.3.2 (04 jul 2013)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   Counter-Strike        Category:   Technical/Development        Approver:   Hawk552 (427)
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-17-2009 , 17:49   [Dyn Native] ColorChat v0.3.2 (04 jul 2013)
Reply With Quote #1

Note that this has been integrated to amxx 1.8.3 core since build 185
Usage here : https://forums.alliedmods.net/showpo...&postcount=232

ColorChat Native




.: Description :.


Colorchat native that can be used by any plugin.

Pro : Instead of using colorchat include that duplicate code in every single plugin in which you use it, use a single plugin to handle colorchat.
Con : Should be a little slower than include, but as you don't plain to send it 1000 times per second, it's not a big deal.

Note : supports ML.



.: Natives :.
  • client_print_color(index, sender, const fmt[], any:...)
  • register_dictionary_colored(const filename[])
    Same as register_dictionary, but transform !g, !t and !n into colors code
    so you can use same ML Keys in normal chat or hudmessage or whereever you want


.: How to use ? :.


You have to start each text with ^4 or ^3 or ^2 or ^1 (or !t, !g, !n in ML files).

In .sma, use ^4 to display green, ^1 to display normal color (yellow by default), and ^3 to display the specified color (2nd arg).
In multilanguage files, use !g to set following text to green, !n to set following text to normal player chat color (yellow by default), and !t to set following text to the color passed in second argument.

Colors for second arg are : a_player_index (use the specified player team color), Red, Blue and Grey.
Those color are applied by ^3 or !t tag.

I've added support for ColorChat stock, all you have to do is to replace at the top of .sma the line :
Code:
#include <colorchat>

with
Code:
#include <chatcolor>



.: Use Example :.


default adminchat edited to use color : http://forums.alliedmods.net/showthr...730#post851730

[img]http://img35.**************/img35/6019/bkzaztecbhop0008.png[/img]




.: Credits :.


Quim, Reymon, Stupok.



__________________
.: Stock Version :.

DON'T USE STOCK VERSION, SEEMS TO HAVE PROBLEM WITH ML Thanks to Nextra who found my mistake, it should works fine now.
If you prefer to use a stock version that doesn't need an extra plugin to work, follow the following link :> Here <




__________________
.: Module Version :.


If you prefer to use a module version, real native is faster, follow the following link :Module Version




__________________
Attached Files
File Type: inc chatcolor.inc (1.9 KB, 18014 views)
File Type: sma Get Plugin or Get Source (colorchat.sma - 14403 views - 6.1 KB)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-14-2013 at 03:03.
ConnorMcLeod is offline
 



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 02:59.


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