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

[Source 2013] Custom Chat Colors


Post New Thread Reply   
 
Thread Tools Display Modes
Amatowarrior
Junior Member
Join Date: May 2012
Old 09-25-2012 , 22:42   Re: [Source 2009] Custom Chat Colors
Reply With Quote #261

Would it be possible for this plugin to be compatible with MySQL in a later release for global management over multiple servers? (Maybe similar to the AdSQL plugin)
__________________



Last edited by Amatowarrior; 09-25-2012 at 22:45.
Amatowarrior is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-26-2012 , 09:14   Re: [Source 2009] Custom Chat Colors
Reply With Quote #262

Quote:
Originally Posted by Amatowarrior View Post
Would it be possible for this plugin to be compatible with MySQL in a later release for global management over multiple servers? (Maybe similar to the AdSQL plugin)
That sounds more like a private project for what your asking.
Mitchell is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 09-26-2012 , 13:15   Re: [Source 2009] Custom Chat Colors
Reply With Quote #263

Quote:
Originally Posted by Mitchell View Post
That sounds more like a private project for what your asking.
Yeah. There's no reason you can't get somebody to write you a MySQL module.
__________________
Dr. McKay is offline
RoniitiS
New Member
Join Date: Jan 2010
Old 09-27-2012 , 13:48   Re: [Source 2009] Custom Chat Colors
Reply With Quote #264

Hello!

Is it possible to change CONSOLE message text color like in this example below ?
If not, maybe it could be done in next release?

"CONSOLE or SERVER"
{
"namecolor" "#code"
"textcolor" "#code"
}

Anyway Thankyou Dr. McKay for this plugin


P.s. Sorry if i got any mistake i am from Latvia
RoniitiS is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 09-27-2012 , 19:18   Re: [Source 2009] Custom Chat Colors
Reply With Quote #265

Planned: http://public-plugins.doctormckay.com/trac/ticket/1
__________________
Dr. McKay is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 09-27-2012 , 22:50   Re: [Source 2009] Custom Chat Colors
Reply With Quote #266

Plugin updated to v1.8.0. Changes:
  • Changed update URL to SVN repository
  • Plugin now properly fails to load when Simple Chat Processor is not installed
__________________
Dr. McKay is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 09-29-2012 , 06:43   Re: [Source 2009] Custom Chat Colors
Reply With Quote #267

I propose the following change to natives:
PHP Code:
enum CCC_ColorType
{
    
CCC_ChatColor,
    
CCC_NameColor,
    
CCC_TagColor
};

native CCC_GetColor(const client, const CCC_ColorType:type, ...);
native CCC_SetColor(const client, const CCC_ColorType:type, ...); 
I know that it's unlikely that a new color type will be added but who knows. This way is more generic and will require less copypasting.

And I also request CCC_ResetColor natives that will restore color altered by CCC_Set natives.
__________________
FaTony is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 10-25-2012 , 01:11   Re: [Source 2009] Custom Chat Colors
Reply With Quote #268

Quote:
Originally Posted by FaTony View Post
I propose the following change to natives:
PHP Code:
enum CCC_ColorType
{
    
CCC_ChatColor,
    
CCC_NameColor,
    
CCC_TagColor
};

native CCC_GetColor(const client, const CCC_ColorType:type, ...);
native CCC_SetColor(const client, const CCC_ColorType:type, ...); 
I know that it's unlikely that a new color type will be added but who knows. This way is more generic and will require less copypasting.

And I also request CCC_ResetColor natives that will restore color altered by CCC_Set natives.
Agreed %100.

It is quite annoying to have to use 1,000 formats to change a player's tag color. However, in the mean time, how does CCC_GetNameColor return? I added
PHP Code:
new String:c_Name[64];
CCC_GetNameColor(clientc_Namesizeof(c_Name));
PrintToServer("%s"c_Name); 
in OnChatMessage to see the return and it results with a period before the actual hex value.

PHP Code:
.FF7700 // Spammed in console a few times on chat message. 

Last edited by ReFlexPoison; 10-25-2012 at 01:11.
ReFlexPoison is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 10-25-2012 , 09:32   Re: [Source 2009] Custom Chat Colors
Reply With Quote #269

I don't see any harm in making that change. I'll do that sometime in the near future and mark the old ones as deprecated.

The Get natives return a String prepended with \x07, but I don't see any reason why it can't just return straight-up hex.
__________________

Last edited by Dr. McKay; 10-25-2012 at 09:33.
Dr. McKay is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 10-25-2012 , 12:17   Re: [Source 2009] Custom Chat Colors
Reply With Quote #270

Quote:
Originally Posted by Dr. McKay View Post
The Get natives return a String prepended with \x07, but I don't see any reason why it can't just return straight-up hex.
So if I want to Format a string with the color I would use:
PHP Code:
new String:c_Name[64];
CCC_GetNameColor(clientc_Namesizeof(c_Name));

 %
s%sc_Namename 
or
PHP Code:
new String:c_Name[64];
CCC_GetNameColor(clientc_Namesizeof(c_Name));

\
x07%s%sc_Namename 
?

Last edited by ReFlexPoison; 10-25-2012 at 12:17.
ReFlexPoison is offline
Reply



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 11:14.


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