AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] Multi Colors (https://forums.alliedmods.net/showthread.php?t=247770)

Bara 09-07-2014 16:52

[INC] Multi Colors
 
You like this plugin or my work? Support is not a crime.
https://www.paypalobjects.com/en_US/..._donate_SM.gif

Multi Colors (based on Stamm-Colors) is a summary of Colors and More Colors. Depending on the game More Colors will be used as default. Should the game be CS:GO Colors will be used. The include providing a perfect base for plugins supporting multiple games.

Functions:
  • CPrintToChat(int client, const char[] message, any ...)
  • CPrintToChatAll(const char[] message, any ...)
  • CPrintToChatEx(int client, int author, const char[] message, any ...)
  • CPrintToChatAllEx(int author, const char[] message, any ...)
  • CReplyToCommand(int author, const char[] message, any ...)
  • CReplyToCommandEx(int client, int author, const char[] message, any ...)
  • CShowActivity(int author, const char[] message, any ...)
  • CShowActivityEx(int author, const char[] tag, const char[] message, any ...)
  • CShowActivity2(int author, const char[] tag, const char[] message, any ...)
  • CPrintToChatObservers(int target, const char[] message, any ...)
  • CPrintToChatObserversEx(int target, const char[] message, any ...)
  • CRemoveTags(char[] message, int maxlen)
  • CFormatColor(char[] message, int maxlength, int author)

By using C* Functions, offers these include a good compatibility to Colors and More Colors.

Links:


If you have this error:
Quote:

addons/sourcemod/scripting/include/regex.inc(175) : error 147: new-style declarations are required
Change this line (175) in your regex.inc:
Quote:

public Extension:__ext_regex =
to this:
Quote:

public Extension __ext_regex =
Download:
https://github.com/Bara20/Multi-Colors

Root_ 09-07-2014 17:33

Re: [INC] Multi Colors - 1.0.0
 
Finally a stock that will not confuse everyone to choose proper colors include, thanks.
BTW Since all games support older colors, you'd better check for Source2009 games first and use MoreColors stock, otherwise use C_PrintToChatAll(buffer) for all other games.

Bara 09-07-2014 18:46

Re: [INC] Multi Colors - 1.0.0
 
Quote:

Originally Posted by Root_ (Post 2195154)
BTW Since all games support older colors, you'd better check for Source2009 games first and use MoreColors stock, otherwise use C_PrintToChatAll(buffer) for all other games.

Feel free to make this (maybe over a pull request), but i can take a look later.

zipcore 09-08-2014 03:38

Re: [INC] Multi Colors - 1.0.0
 
good job mate ;)

iBradleyy 09-20-2014 10:53

Re: [INC] Multi Colors - 1.0.0
 
addons\sourcemod\scripting\includes\multicolo rs.inc(414) : error 001: expected token : ";" but found "}" - Download from the GitHub.

Bara 09-20-2014 11:05

Re: [INC] Multi Colors - 1.0.0
 
Quote:

Originally Posted by iBradleyy (Post 2201612)
addons\sourcemod\scripting\includes\multicolo rs.inc(414) : error 001: expected token : ";" but found "}" - Download from the GitHub.

Fixed.

h3bus 03-24-2015 06:13

Re: [INC] Multi Colors - 1.0.1
 
On CS:GO, is the specific quirk when text starts with a color handled?
Inserting \x01\x0B is needed before the color code otherwise default color is displayed.

I can't find it in the code.

Bara 03-24-2015 10:14

Re: [INC] Multi Colors - 1.0.1
 
Quote:

Originally Posted by h3bus (Post 2277447)
On CS:GO, is the specific quirk when text starts with a color handled?
Inserting \x01\x0B is needed before the color code otherwise default color is displayed.

I can't find it in the code.

Added ;)
https://github.com/Bara20/Multi-Colo...cafb33c95aabe2

h3bus 03-24-2015 11:24

Re: [INC] Multi Colors - 1.0.1
 
Thanks! I certainly will be using this!

Just for the sake of optimisation, do you know if there is a way to hook translation system when it loads a phrase, so we do the color replacements once and for all at load time?
This would be sweet!

Bara 06-09-2015 05:26

Re: [INC] Multi Colors - 2.0.0
 
Updated to Version 2.0.0
  • Include requires now sourcemod 1.7 and is fully compatible with
Quote:

#pragma newdecls required



If you have this error:
Quote:

addons/sourcemod/scripting/include/regex.inc(175) : error 147: new-style declarations are required
Change this line (175) in your regex.inc:
Quote:

public Extension:__ext_regex =
to this:
Quote:

public Extension __ext_regex =


All times are GMT -4. The time now is 11:56.

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