Raised This Month: $32 Target: $400
 8% 

[1.8.3] show_activity_color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-03-2018 , 13:11   [1.8.3] show_activity_color
Reply With Quote #1

Since we'll have client_print_color, the show_activity functions will be kinda outdaded because they are hardcoded to use the regular client_print function.

I want to add colors to these functions and sumbit a pull request, but I need suggestions on what is the best method to do this. I mean, I can easily copy/paste the functions and change the print function, but it doesn't seem right. Adding a bool in the current ones will break backwards compatibility (unless it's possible to add a parameter after the "any:..." one). Maybe some #define magic? Any suggestions?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-03-2018 , 13:37   Re: [1.8.3] show_activity_color
Reply With Quote #2

Chat colors are really game dependent as far as I know.
__________________

Last edited by klippy; 01-03-2018 at 13:39.
klippy is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 01-06-2018 , 18:38   Re: [1.8.3] show_activity_color
Reply With Quote #3

Don't forget that there are other games apart from CS/CZ. AFAIK HL for example doesn't support custom chat colors.
__________________


Last edited by NiHiLaNTh; 01-06-2018 at 18:38.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-06-2018 , 19:18   Re: [1.8.3] show_activity_color
Reply With Quote #4

Since not all games supported by AMX Mod X support chat colors, you cannot change the core functionality to include it.

This is better left for custom modification.
__________________
fysiks is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-06-2018 , 20:05   Re: [1.8.3] show_activity_color
Reply With Quote #5

I didn't plan to change it. I wanted to add those functions so we can properly use colorchat with amx_show_activity. client_print_color already is in the core - probably only active when the game supports it.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-06-2018 , 21:41   Re: [1.8.3] show_activity_color
Reply With Quote #6

Regardless of whether or not a game supports color, a standard notification doesn't need to have any special coloring since which colors and where is extremely subjective. Hence, why this type of thing should be left to individual server customization (that is why the plugin concept exists).
__________________
fysiks is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-06-2018 , 21:48   Re: [1.8.3] show_activity_color
Reply With Quote #7

Quote:
Originally Posted by KliPPy View Post
Chat colors are really game dependent as far as I know.
Yeah, and color codes (and its colors) are different.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-07-2018 , 06:44   Re: [1.8.3] show_activity_color
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
Regardless of whether or not a game supports color, a standard notification doesn't need to have any special coloring since which colors and where is extremely subjective. Hence, why this type of thing should be left to individual server customization (that is why the plugin concept exists).
Like I said - I'm aware of that. Currently you can't add colors to show_activity in CS. If someone wants to do it - he will have to edit the .inc file or add new stocks that will support color because AMXX doesn't offer any function to deal with that. Is adding another .inc file for cstrike that will contain colored show_activity functions a valid solution?
__________________

Last edited by OciXCrom; 01-07-2018 at 06:44.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-07-2018 , 08:40   Re: [1.8.3] show_activity_color
Reply With Quote #9

Quote:
Originally Posted by OciXCrom View Post
Like I said - I'm aware of that. Currently you can't add colors to show_activity in CS. If someone wants to do it - he will have to edit the .inc file or add new stocks that will support color because AMXX doesn't offer any function to deal with that. Is adding another .inc file for cstrike that will contain colored show_activity functions a valid solution?
I understood you. You want to replace client_print with client_print_color and you don't want to replace the strings. And after that users can just edit .txt translations to add colors.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-07-2018 , 13:15   Re: [1.8.3] show_activity_color
Reply With Quote #10

Yeah, just copy the functions and use client_print_color instead. If an amxmisc_cstrike.inc file can be included automatically when amxmisc.inc is included, it will be great.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 04:13.


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