Monthly Target: $400 Donations: $143
 35% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-26-2012 , 05:07   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #161

Well, first, don't use the stock, it fails with ML and id = 0.
Then, if you use rage module for other stuff, or if you want to try it out (could be usefull for lot of stuff later), use the module, else the fake native is fine.
I've just made few changes in the fake native version, since we don't need to send the TeamInfo message with a connecter player or even "in range" player, so this version doesn't send a second TeamInfo message, let's try it and tell me if all is working fine.
Attached Files
File Type: sma Get Plugin or Get Source (colorchat.sma - 268 views - 6.7 KB)
__________________
- tired and retired -
ConnorMcLeod is offline
isotonic
Senior Member
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
Send a message via ICQ to isotonic Send a message via Skype™ to isotonic
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-27-2012 , 12:50   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #163

1. Stock version doesn't differs from fake native, you see the color of YOUR team when you use id=0, whatever the name you pass in the string, so even if command is use by a terrorist, each player gonna see his own color.

2. Already explained.
__________________
- tired and retired -
ConnorMcLeod is offline
isotonic
Senior Member
Join Date: Jun 2011
Location: Moscow, Russia
Old 04-27-2012 , 13:07   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #164

1. I believe I have written a lot to explain that stock version DOES differ from fake native. After replacing stock->native all players see GREY color.
2. Where?

Last edited by isotonic; 04-27-2012 at 13:09.
isotonic is offline
Send a message via ICQ to isotonic Send a message via Skype™ to isotonic
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-27-2012 , 13:27   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #165

1. Yes you are right, module version should fix all problems
2. Problem is ML doesn't work as expacted, use stock version if you want, i just don't support it anymore.

Problem should be fixed in new module version : http://forums.alliedmods.net/showthr...33#post1699733

Instead of :

new iColor = get_user_team2(id)
client_print_color(0, iColor, "^4green ^3%s ^1test", name)

You should now use the new native :

client_print_color2(0, id, "^4green ^3%s ^1test", name)
__________________
- tired and retired -

Last edited by ConnorMcLeod; 05-01-2012 at 08:22.
ConnorMcLeod is offline
wAyz
Senior Member
Join Date: Feb 2010
Location: Germany
Old 07-17-2012 , 20:24   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #166

Hi,

I would like to know how to add another 2 Colors here:

Code:
Color_Chat_Lang(ids, GREY, "%L",LANG_SERVER,"UQSTATS_CCHAT_NORMALA",prefix, g_playername[id], distance[id],Jtype[id],block_str,weapon_name,pre_type[id],airacel[id]);
I want "prefix" to be Green, and "airacel[id]" to be Blue, is that possible?
plugin: uq_jumpstats v2.42

Last edited by wAyz; 07-17-2012 at 20:50.
wAyz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-18-2012 , 01:01   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #167

Color_Chat_Lang is not from my colorchat.

Quoi qu'il en soit :

You need to open the .txt lang file and change there what you need.
__________________
- tired and retired -
ConnorMcLeod is offline
wAyz
Senior Member
Join Date: Feb 2010
Location: Germany
Old 07-18-2012 , 01:09   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #168

Quote:
Originally Posted by ConnorMcLeod View Post
Color_Chat_Lang is not from my colorchat.

Quoi qu'il en soit :

You need to open the .txt lang file and change there what you need.
Okay in the language file the line looks like that:

Code:
UQSTATS_CCHAT_NORMALA = %s%s jumped %.3f units with %s!!y%s!y%s!y%s !y[%s]
Unfortunately there isn't any Blue value in ML-Files, is there? Only Green (!g), and Yellow (!y) afaik.
wAyz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-18-2012 , 01:33   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #169

You need to change here :

Color_Chat_Lang(ids, GREY

to BLUE

And in the .txt add ( I GUESS: ) !t in order to use BLUE team color.

Again, i'm not supporting that colorchat that is not mine, i tried to help you because it seemed easy so far, but if you don't manage with this, ask to uq_jumpstats author, thanks.


Also, multiple '!y' in a row without other !g or !t are useless and will make the code to be executed slower. Just let the first !y if you don't put other ones.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 07-18-2012 at 01:35.
ConnorMcLeod is offline
wAyz
Senior Member
Join Date: Feb 2010
Location: Germany
Old 07-18-2012 , 01:41   Re: [Native/Stock] ColorChat v0.2.1 (28 dec 2010)
Reply With Quote #170

Quote:
Originally Posted by ConnorMcLeod View Post
You need to change here :

Color_Chat_Lang(ids, GREY

to BLUE

And in the .txt add ( I GUESS: ) !t in order to use BLUE team color.

Again, i'm not supporting that colorchat that is not mine, i tried to help you because it seemed easy so far, but if you don't manage with this, ask to uq_jumpstats author, thanks.


Also, multiple '!y' in a row without other !g or !t are useless and will make the code to be executed slower. Just let the first !y if you don't put other ones.
Okay thanks. And yes, I thought so too about the multiple '!y', the author seemed to miss that.
wAyz is offline
Reply


Thread Tools
Display Modes

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 00:36.


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