forked from UNLOZE/sm-plugins
Misc: Move shared stuff to shared git.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
// Custom Chat Colors is written by Dr. McKay (http://www.doctormckay.com)
|
||||
// Simple Chat Colors (Redux) is written by Antithasys
|
||||
// The configuration is very similar, so I've stolen Redux's documentation :P
|
||||
//
|
||||
// How to edit this file:
|
||||
// "admin_colors" <-- Leave this alone
|
||||
// { <-- Add all groups/steamids after first bracket (Leave this alone)
|
||||
//
|
||||
// "STEAM_0:1:1234567" <-- Here is a steamid example with a tag (don't duplicate steamids)
|
||||
// {
|
||||
// "namecolor" "#RRGGBB" <-- This is the color for the name (#RRGGBB in hex notation or #RRGGBBAA with alpha)
|
||||
// "textcolor" "#RRGGBBAA" <-- This is the color of the text
|
||||
// }
|
||||
//
|
||||
// "groupname" <-- This can either be a steamid for a specific player, or a group name
|
||||
// { <-- Open the group
|
||||
// "flag" "z" <-- This is the flag(s) assoicated with the group. This field doesn't matter if the group name is a steamid
|
||||
// "tag" "[admin]" <-- This is the text for the tag
|
||||
// "tagcolor" "O" <-- This is the color for the tag
|
||||
// "namecolor" "G" <-- This is the color for the name
|
||||
// "textcolor" "T" <-- This is the color of the text
|
||||
// } <-- Close the group
|
||||
// } <-- Add all groups/steamids before last bracket (Leave this alone)
|
||||
//
|
||||
// NOTE:
|
||||
// If you don't enter a steamid then the group name does not matter, it's just for your reference.
|
||||
//
|
||||
// For colors, either a hex notation of a color (#RRGGBB or #RRGGBBAA) or one of the supported shortcuts (O - Olive, G - Green, T - Team) is required
|
||||
//
|
||||
// --------ORDER OF OPERATIONS--------
|
||||
//
|
||||
// The order in which you place items in the config file matters. Here is what determins what color they get:
|
||||
// 1. SteamID
|
||||
// If there is a steamid present, it will always override everything. If you put a steamid in twice
|
||||
// then the first entry (top to bottom) will be used. (I think, just don't do it!)
|
||||
// 2. Groups
|
||||
// The plugin will search (top to bottom) for a postitive match for the flag string. The player' flags
|
||||
// will be compared with the group flag character (NOTE: only one flag per group! "a" is okay, "ab" is NOT),
|
||||
// and if the player has the flag, it will stop there.
|
||||
// For example. Admins with the "ad" flags and donators with the "a" flag. If you place the "a" flag group
|
||||
// above the "d" group then the admin will get the "a" colors. Order matters.
|
||||
//
|
||||
// ---------DO NOT EDIT ABOVE THIS LINE---------
|
||||
"admin_colors"
|
||||
{
|
||||
"STEAM_0:1:16"
|
||||
{
|
||||
"tag" "[BAILOPAN] "
|
||||
"tagcolor" "O"
|
||||
}
|
||||
"VIP"
|
||||
{
|
||||
"flag" "a"
|
||||
"tag" "[VIP] "
|
||||
"tagcolor" "#9EC34FAA"
|
||||
"namecolor" "#00CCFF"
|
||||
"textcolor" "#000000AA"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"restricted_users"
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
//custom-chatcolorsreplace.cfg
|
||||
|
||||
"AutoReplace"
|
||||
{
|
||||
":lenny:" "( ͡° ͜ʖ ͡°)"
|
||||
":alenny:" "{red}( {orange}͡{yellow}°{green} ͜{lightblue}ʖ {blue}͡{purple}°{white})"
|
||||
":ynnel:" "{red}({orange} {yellow}͜。{green} ͡{lightblue}ʖ {blue}͜{purple}。{white}) "
|
||||
":rainbow:" "{red}( ͡° ͜ʖ ͡°) {orange} ( ͡° ͜ʖ ͡°) {yellow} ( ͡° ͜ʖ ͡°) {green} ( ͡° ͜ʖ ͡°) {blue} ( ͡° ͜ʖ ͡°) {indigo} ( ͡° ͜ʖ ͡°) {violet} ( ͡° ͜ʖ ͡°)"
|
||||
":feel:" "( ´_ゝ`)"
|
||||
":chill:" "( ≖‿≖)"
|
||||
":cute:" "(´・ω・`)"
|
||||
":shrug:" "¯\_(ツ)_/¯"
|
||||
":smile:" "( ・◡・)"
|
||||
":sad:" "( ´A`)"
|
||||
":happy:" "(´∀`)"
|
||||
":3:" "( ¯3¯)"
|
||||
":dunno:" "┐(´д`)┌"
|
||||
":please:" "(人・_・) pleaseeee!"
|
||||
":table:" "(╯°□°)╯︵ ┻━┻"
|
||||
":?:" "ヽ( ゚Д゚)ノ?"
|
||||
":over:" "{red}͇̿ ͇̿ ̶͇̿ι͇̿ ͇̿ ̶͇̿ι {orange}|̶̿ ̶̿ ̶̶̿̿|{violet} |̿ V ̿| |̶͇̿ ̶͇̿ {green}͇̿ |͇̿ ͇̿ ͇̿| \ ͇{indigo} / |̶͇̿ ̶͇̿ ͇̿ |̿J"
|
||||
":heart:" "{aqua}❤{violet}❤{fullred}❤{lightyellow}❤{lightgreen}❤{pink}❤{orange}❤{greenyellow}❤{white}❤{violet}❤{indigo}❤{navy}❤{firebrick}❤{fuchsia}❤{lime}❤{hotpink}❤"
|
||||
":america:" "{white}< ̄`ヽ、 / ̄> {red}ゝ、( ͡° ͜ʖ ͡°) ノ {blue}ゝ ┴ ┴ ノ"
|
||||
|
||||
":ukraine:" "{mediumblue}
|
||||
███████████ {yellow}
|
||||
███████████ "
|
||||
|
||||
":russia:" "{white}
|
||||
███████████{fullblue}
|
||||
███████████{fullred}
|
||||
███████████"
|
||||
|
||||
":germany:" "{black}
|
||||
███████████{fullred}
|
||||
███████████{yellow}
|
||||
███████████"
|
||||
|
||||
":poland:" "{white}
|
||||
███████████{fullred}
|
||||
███████████"
|
||||
|
||||
":austria:" "{fullred}
|
||||
███████████{white}
|
||||
███████████{fullred}
|
||||
███████████"
|
||||
|
||||
":france:" "
|
||||
{fullblue}██{white}██{fullred}██
|
||||
{fullblue}██{white}██{fullred}██
|
||||
{fullblue}██{white}██{fullred}██"
|
||||
|
||||
":romania:" "
|
||||
{navy}██{gold}██{fullred}██
|
||||
{navy}██{gold}██{fullred}██
|
||||
{navy}██{gold}██{fullred}██"
|
||||
|
||||
":italy:" "
|
||||
{darkgreen}██{white}██{fullred}██
|
||||
{darkgreen}██{white}██{fullred}██
|
||||
{darkgreen}██{white}██{fullred}██"
|
||||
|
||||
":moldova:" "
|
||||
{fullblue}██{gold}██{fullred}██
|
||||
{fullblue}██{gold}██{fullred}██
|
||||
{fullblue}██{gold}██{fullred}██"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,191 @@
|
||||
/**
|
||||
* This is the include file for Custom Chat Colors
|
||||
* https://forums.alliedmods.net/showthread.php?t=186695
|
||||
* To check that Custom Chat Colors is installed and running, verify that the "ccc" library exists
|
||||
*/
|
||||
|
||||
#if defined _ccc_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _ccc_included
|
||||
|
||||
enum CCC_ColorType {
|
||||
CCC_TagColor,
|
||||
CCC_NameColor,
|
||||
CCC_ChatColor
|
||||
};
|
||||
|
||||
#define COLOR_NULL -1
|
||||
#define COLOR_NONE -2
|
||||
#define COLOR_CGREEN -3 //0x40FF40
|
||||
#define COLOR_OLIVE -4 //0x99FF99
|
||||
#define COLOR_TEAM -5
|
||||
|
||||
/**
|
||||
* Gets a client's color as a hexadecimal integer.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param type Color type to retreive
|
||||
* @param alpha Pass a boolean variable by reference here and it will be true if the color has alpha specified or false if it doesn't (or is a stock color)
|
||||
* @return Color as a hexadecimal integer (use %X in formatting to get a hexadecimal string)
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native int CCC_GetColor(int client, CCC_ColorType type, bool &alpha = false);
|
||||
|
||||
/**
|
||||
* Sets a client's color as a hexadecimal integer.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param type Color type to set
|
||||
* @param color Integer representation of the color (use StringToInt(input, 16) to convert a hexadecimal string) or one of the color defines
|
||||
* @param alpha Are you specifying a color with alpha?
|
||||
* @return True if the color is updated successfully, false otherwise
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native int CCC_SetColor(int client, CCC_ColorType type, int color, bool alpha);
|
||||
|
||||
/**
|
||||
* Gets a client's tag
|
||||
*
|
||||
* @param client Client index
|
||||
* @param buffer Buffer to store the tag in
|
||||
* @param maxlen Maximum buffer length
|
||||
* @noreturn
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native int CCC_GetTag(int client, char[] buffer, int maxlen);
|
||||
|
||||
/**
|
||||
* Sets a client's tag
|
||||
*
|
||||
* @param client Client index
|
||||
* @param tag String containing the new tag
|
||||
* @noreturn
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native void CCC_SetTag(int client, const char[] tag);
|
||||
|
||||
/**
|
||||
* Resets a client's color to the value in the config file.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param type Color type to restore
|
||||
* @noreturn
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native int CCC_ResetColor(int client, CCC_ColorType type);
|
||||
|
||||
/**
|
||||
* Resets a client's tag to the value in the config file.
|
||||
*
|
||||
* @param client Client index
|
||||
* @noreturn
|
||||
*
|
||||
* On error/errors: Invalid client index or client is not in game
|
||||
*/
|
||||
native int CCC_ResetTag(int client);
|
||||
|
||||
/**
|
||||
* Called when a cilent's name is about to be colored
|
||||
* DO NOT START A NEW USERMESSAGE (i.e. PrintToChat, PrintToChatAll) WITHIN THIS FORWARD
|
||||
*
|
||||
* @param client Client index
|
||||
* @return Plugin_Handled to prevent coloring, Plugin_Continue to allow coloring
|
||||
*/
|
||||
//#pragma deprecated Use CCC_OnColor instead
|
||||
//forward Action:CCC_OnNameColor(client);
|
||||
|
||||
/**
|
||||
* Called when a client's chat is about to be colored
|
||||
* DO NOT START A NEW USERMESSAGE (i.e. PrintToChat, PrintToChatAll) WITHIN THIS FORWARD
|
||||
*
|
||||
* @param client Client index
|
||||
* @return Plugin_Handled to prevent coloring, Plugin_Continue to allow coloring
|
||||
*/
|
||||
//#pragma deprecated Use CCC_OnColor instead
|
||||
//forward Action:CCC_OnChatColor(client);
|
||||
|
||||
/**
|
||||
* Called when a client's name is about to be tagged
|
||||
* DO NOT START A NEW USERMESSAGE (i.e. PrintToChat, PrintToChatAll) WITHIN THIS FORWARD
|
||||
*
|
||||
* @param client Client index
|
||||
* @return Plugin_Handled to prevent tagging, Plugin_Continue to allow tagging
|
||||
*/
|
||||
//#pragma deprecated Use CCC_OnColor instead
|
||||
//forward Action:CCC_OnTagApplied(client);
|
||||
|
||||
/**
|
||||
* Called when a client's name is about to be tagged
|
||||
* DO NOT START A NEW USERMESSAGE (i.e. PrintToChat, PrintToChatAll) WITHIN THIS FORWARD
|
||||
*
|
||||
* @param client Client index
|
||||
* @param message Chat message that will be printed
|
||||
* @param type What type of color will be applied. If this is CCC_TagColor, it controls whether the tag will be applied at all, not whether the tag will be colored.
|
||||
* @return Plugin_Handled to prevent coloring, Plugin_Continue to allow coloring
|
||||
*/
|
||||
//forward Action:CCC_OnColor(client, const String:message[], CCC_ColorType:type);
|
||||
|
||||
/**
|
||||
* Called when a message has been fully colored and will be sent, unless further plugins modify it through Simple Chat Processor
|
||||
*
|
||||
* @param client Recieving client index
|
||||
* @param author Author client index
|
||||
* @param message Message
|
||||
* @return Plugin_Handled to block message, Plugin_Continue to allow message
|
||||
*/
|
||||
forward Action CCC_OnChatMessage(int client, int author, const char[] message);
|
||||
|
||||
/**
|
||||
* Called when a client's colors and tag are about to be loaded from the config file
|
||||
* At this point, the client has NO COLORS
|
||||
*
|
||||
* @param client Client index
|
||||
* @return Plugin_Handled or Plugin_Stop to prevent loading, Plugin_Continue or Plugin_Changed to allow
|
||||
*/
|
||||
forward Action CCC_OnUserConfigPreLoaded(int client);
|
||||
|
||||
/**
|
||||
* Called when a client's colors and tag have been loaded from the config file
|
||||
*
|
||||
* @param client Client index
|
||||
* @noreturn
|
||||
*/
|
||||
forward void CCC_OnUserConfigLoaded(int client);
|
||||
|
||||
/**
|
||||
* Called when the configuration file is reloaded with the sm_reloadccc command
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
forward void CCC_OnConfigReloaded();
|
||||
|
||||
native int CCC_UpdateIgnoredArray(bool IgnoredArray[(MAXPLAYERS + 1) * (MAXPLAYERS + 1)]);
|
||||
|
||||
public SharedPlugin __pl_ccc =
|
||||
{
|
||||
name = "ccc",
|
||||
file = "custom-chatcolors.smx",
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public __pl_ccc_SetNTVOptional() {
|
||||
MarkNativeAsOptional("CCC_GetColor");
|
||||
MarkNativeAsOptional("CCC_SetColor");
|
||||
MarkNativeAsOptional("CCC_GetTag");
|
||||
MarkNativeAsOptional("CCC_ResetTag");
|
||||
MarkNativeAsOptional("CCC_ResetColor");
|
||||
MarkNativeAsOptional("CCC_ResetTag");
|
||||
MarkNativeAsOptional("CCC_UpdateIgnoredArray");
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
"Phrases"
|
||||
{
|
||||
"Cstrike_Chat_CT_Loc"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "(Counter-Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_CT"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "(Counter-Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_T_Loc"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "(Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_T"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "(Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_CT_Dead"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "*DEAD*(Counter-Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_T_Dead"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "*DEAD*(Terrorist) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_Spec"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "(Spectator) {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_All"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "{1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_AllDead"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "*DEAD* {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_AllSpec"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "*SPEC* {1} : {2}"
|
||||
}
|
||||
"Cstrike_Chat_Me"
|
||||
{
|
||||
"#format" "{1:s},{2:s}"
|
||||
"en" "* {1} {2}"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user