View Single Post
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 04-27-2012 , 11:49   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #162

1st problem - colors ;)
Let us assume that 'id' is the player's id who run a command. Player is in TERRORISTS team.
Than I use stock version:
PHP Code:
#include <colorchat>
...
get_user_name(idname31)
ColorChat(0DontChange"green ^3%s ^1test"name
I get red player name as I need:
green Player Name test

Then I use fake native and its include:
PHP Code:
#include <chatcolor>
...
get_user_name(idname31)
ColorChat(0DontChange"^4green ^3%s ^1test"name
I get grey player name:
green Player Name test

I'm forced to use such construction in order to get right color of player's team:
PHP Code:
...
new 
iColor get_user_team2(id)
client_print_color(0iColor"^4green ^3%s ^1test"name)
...
get_user_team2(id)
{
 new 
szTeam[2]
 
get_user_team(idszTeam1)
 switch( 
szTeam[0] )
 {
  case 
'U':return // Don't change
  
case 'T':return // Red
  
case 'C':return // Blue
  
case 'S':return // Grey
 
}
 return 
0

And I also need start with ^4 to get base text green.

So I can't just replace stock version with fake native replacing <colorchat> with <chatcolor>. And code becames more complicated - I need to set iColor every time and always set start color.
Is it intended? Or is it some kind of bug?

--
2nd problem - humans ;)
There are not so more plugins using 'external' colorchat. In other words even with stock many people decided to implement color chat by themselves. For example Admin Prefixes. I believe they really don't understand that using separate plugin to handle ALL colorochat is the best option for all. That's why there are almost no plugins using your fake native. Furthermore users don't see reasons to have additional plugin to get colorchat support for ONE of its plugins. Using stock version was a solution. And now you abandon stock version...

Last edited by isotonic; 04-27-2012 at 11:55.
isotonic is offline