Иконка ресурса

Chat Manager v4.8

Нет прав для скачивания
Сообщения
1,176
Реакции
2,144
Помог
57 раз(а)
OciXCrom, My question is why the quote is added at beginning of the message? Look at screen, I don't write symbol "
Код:
    static szArgs[WRITTEN_MESSAGE_SIZE]
    read_args(szArgs, charsmax(szArgs)); remove_quotes(szArgs)
    CC_RemoveColors(szArgs, charsmax(szArgs))
Сообщение приходит обрамлённое кавычками. И если оно длиннее WRITTEN_MESSAGE_SIZE, лишняя часть обрезается, включая закрывающие двойные кавычки. А в описании remove_quotes():
Код:
* @note If the string only has a double-quote at either the start *or* the end,
*       and not both, the function will do nothing.
 
Сообщения
576
Реакции
1,003
Помог
18 раз(а)
валидная длина сообщения от клиента
128 - "say " = 124
128 - "say_team " = 119
В эти байты должно влезть сообщение игрока + кавычки + нульбайт
 
Сообщения
157
Реакции
279
pheronix, there already is such an option. You can use "flag" or "steamid" as "type" in the [Name Customization] section and all other section.

Код:
[Name Customization]
# Here you can modify the name shown for certain players when using $custom_name$.
# Syntax: "type" "info" "custom name" "[expiration date]"

"name" "OciXCrom" "&x03Oci&x04XC&x03rom"
"steam" "STEAM_0:0:50153248" "&x04Cool Name"
"flag" "d" "&x03Cool &x04Na&x01me" "20.09.2020"
 
Сообщения
256
Реакции
12
Is it possible to do it for any names? Like if User Wants only Single Color green for his nickname..bu he can also change his nickname.
 
Сообщения
157
Реакции
279
pheronix, If you set a custom name by SteamID, the name will always be the same no matter what name the user has chosen. He can't change the name by himself. He can, however, disable the custom name via the /cm command.

You can, however, set a custom chat format for that user and make only the name colored via the [Format Definitions] and [Say/Say_Team Formats] sections. You can do this by applying a color before the $name$ placeholder.
 
Сообщения
256
Реакции
12
pheronix , If you set a custom name by SteamID, the name will always be the same no matter what name the user has chosen. He can't change the name by himself. He can, however, disable the custom name via the / cm command.

You can, however, set a custom chat format for that user and make only the name colored via the [Format Definitions] and [Say / Say_Team Formats] sections. You can do this by applying a color before the $ name $ placeholder.
"name" "OciXCrom" "& x03Oci & x04XC & x03rom"

I just needed like
"flag" "a" "namecolor"[/icode]
 
Последнее редактирование модератором:
Сообщения
157
Реакции
279
pheronix, you can use the Format Definitions section in order to change the name color based on the flag. For example, define a new format in the [Format Definitions] section and change the color before the $custom_name$ variable:

Код:
format_green_name = $dead_prefix$ &x04$custom_name$ &x01: $chat_color$$message$
format_green_name_team = $dead_prefix$ ($team$) &x04$custom_name$ &x01: $chat_color$$message$
Then, assign this format in the [Say/Say_Team Formats] section:

Код:
"flag" "a" "format_green_name" "format_green_name_team"
If you're having difficulties or your configuration is different, please post your .ini file here.
 
Сообщения
109
Реакции
6
Помог
2 раз(а)
this chat manager should also stop floods? like someone type /bp gets flooded ? may be you plugin can block those i guess.

i am using it 4.5 and no complains
 
Сообщения
256
Реакции
12
pheronix, you can use the Format Definitions section in order to change the name color based on the flag. For example, define a new format in the [Format Definitions] section and change the color before the $custom_name$ variable:

Код:
format_green_name = $dead_prefix$ &x04$custom_name$ &x01: $chat_color$$message$
format_green_name_team = $dead_prefix$ ($team$) &x04$custom_name$ &x01: $chat_color$$message$
Then, assign this format in the [Say/Say_Team Formats] section:

Код:
"flag" "a" "format_green_name" "format_green_name_team"
If you're having difficulties or your configuration is different, please post your .ini file here.

Yeah I am very Confused.. Can you please help me to set it.. Here is My ini File..
Admin With "l" Flag
blue-admin-prefix green-name(anyname) red-chatcolor
Admin With "a" Flag
red-admin-prefix green-name(anyname) blue-chatcolor
Admin With "d" Flag
green-admin-prefix teamcolor-name(anyname) normal-chatcolor

INI:
#==============================================#
# Chat Manager by OciXCrom: Configuration file #
#==============================================#

# Colors: &x01 (DEFAULT), &x03 (TEAM COLOR); &x04 (GREEN); &x05 (WHITE); &x06 (BLUE); &x07 (RED)
# Combining two or more team colors is NOT POSSIBLE in CS 1.6: &x03, &x05, &x06, &x07 - only ONE of these can be used inside a message.

[Main Settings]
# If set to 1, all players will see all chats independent of whether they are dead or alive, excluding the other team's private chat.
# If set to 2, all players will see all chats, including the opposite team's private chat.
ALL_CHAT = 0

# Players with these flags will see all chats at all time, including all team chats.
ADMIN_LISTEN_FLAGS = a

# If the message starts with any of these symbols, it will be hidden in chat. Example: @, /, !
BLOCK_FIRST_SYMBOLS = @, /, !

# Prefixes for dead and alive players. Yes, you can set a prefix like [I]ALIVE[/I] too.
DEAD_PREFIX = [I]DEAD[/I]
ALIVE_PREFIX =

# The standard spectator prefix.
SPEC_PREFIX = [I]SPEC[/I]

# Team prefixes that are usually shown in the team chat, in brackets.
TEAM_PREFIX_T = Terrorist
TEAM_PREFIX_CT = Counter-Terrorist
TEAM_PREFIX_SPEC = Spectator

# Text that will show when the plugin can't detect a player's location when using geoip.
ERROR_TEXT = ?

# Time formatting when $time$ is used. More info here: [URL]http://www.cplusplus.com/reference/ctime/strftime/[/URL]
FORMAT_TIME = %X

# This is the file where chat messages will be logged. If you want to disable logging, leave this setting blank.
CHAT_LOG_FILE =

# Format to use for the chat logs. Formats are defined in the [Format Definitions] section.
CHAT_LOG_SAY_FORMAT = log_say
CHAT_LOG_TEAM_FORMAT = log_team

# Here you can set a sound that will play when a message is written in chat. If it's blank, no sound will be played.
SAY_SOUND =
SAY_TEAM_SOUND =

# Date format for use with expiration dates where available in sections down below.
# For a list of valid parameters, see: [URL]http://www.cplusplus.com/reference/ctime/strftime/[/URL]
EXPIRATION_DATE_FORMAT = %d.%m.%Y

# What to do when the date for a specific extra has expired?
# 0 = ignore the entire line
# 1 = put a "#" symbol in the beginning of the line
# 2 = remove the entire line from the file
# Note that when the setting is non-zero, the entire file will be rewritten after being read.
EXPIRATION_DATE_BEHAVIOR = 0

[Format Definitions]
# In this section you can define chat formats that you can assign to different users in the [User Formats] section.
# You should create a different format for the say and say_team chat, if you don't wan't them to look the same.
# You can use the following placeholders: $admin_prefix$, $dead_prefix$, $team$, $name$, $custom_name$, $ip$, $steam$, $userid$, $chat_color$, $message$, $time$
# You can also use these, but they need to be enabled in the .sma file first: $health$, $armor$, $frags$, $deaths$, $city$, $country$, $country_code$, $continent$, $continent_code$
# Using OciXCrom's Rank System gives you access to even more placeholders: $rank$, $current_xp$, $next_xp$, $level$, $next_level$, $next_rank$. Only the first one is enabled by default.
# To enable an additional placeholder, simply locate the #define ARG_ line in the beginning of the .sma file and uncomment it (remove //), then recompile the plugin.
# Syntax: format name = format style

format_admin = $dead_prefix$ $admin_prefix$ &x04$custom_name$ &x01> $chat_color$$message$
format_admin_team = $dead_prefix$ ($team$) $admin_prefix$ &x04$custom_name$ &x01> $chat_color$$message$
format_player = $dead_prefix$ &x03$custom_name$ &x01> $chat_color$$message$
format_player_team = $dead_prefix$ ($team$) &x03$custom_name$ &x01> $chat_color$$message$
format_owner = $dead_prefix$ $admin_prefix$ &x04$custom_name$ &x01> $chat_color$$message$
format_owner_team = $dead_prefix$ ($team$) $admin_prefix$ &x04$custom_name$ &x01> $chat_color$$message$

log_say = [ $ip$ | $steam$ ] $dead_prefix$ $name$: $message$
log_team = [ $ip$ | $steam$ ] ($team$) $dead_prefix$ $name$: $message$

# In the sections down below you can set different prefixes, chat colors and custom names for each player or a group of players.
# You can add an unlimited amount of these extras. Each new extra needs to be added on a new line in the correct section.
# Bear in mind that the extras that are higher in the list have priority over the ones below them.
# This means that if a player for example meets the requirements for 2 or more prefixes, he will receive the one that's first in the list.

# In the syntaxes, you will find a parameter called "type". This parameter can be one of the following: flag, name, ip, steam, anyflag or noprefix.
# If it's set to "flag" (or "flags"), the plugin will check if the player has ALL of the admin flags set in the "info" parameter. You can set multiple flags instead of only one.
# The "name", "ip" and "steam" settings will check if the player's name, IP or SteamID is equal to the one set in the "info" parameter.
# When set to "anyflag", it will check if the player has ANY of the admin flags specified in the "info" parameter.
# Setting it to "noprefix" will check if the player doesn't have a prefix set. The "info" parameter doesn't have a function in this case, so you can leave it blank.

# If you're using OciXCrom's Rank System, you can also use the parameter "level" to check the user's level.

# The "expiration date" parameter is optional, so you can skip it. If set, this will be the date until the extra will be active.
# If the date has passed, the plugin will ignore the entire line. Dates must be written in the same format as set in the DATE_FORMAT setting.
# If the DATE_FORMAT setting is empty or not found in the [Settings] section, the plugin will ignore the expiration date and the extra will be active all the time.

[Admin Prefixes]
# Here you can add custom prefixes to specific players or flags that are shown when using $admin_prefix$.
# Syntax: "type" "info" "prefix" "[expiration date]"

#"name" "OciXCrom" "[Timed Prefix]" "31.12.2030"
#"name" "OciXCrom" "[Scripter]"
#"steam" "STEAM_0:0:50153248" "[CM Creator]"
#"ip" "127.0.0.1" "[BOT]"
"flag" "l" "&x07]~ADMIN~["
"flag" "a" "&x06]~ADMIN~["
"flag" "d" "&x04]~ADMIN~["
#"flag" "mnp" "[Premium]"
#"flag" "b" "[VIP]"

[Chat Colors]
# Here you can add different chat colors to specific players or flags that are shown when using $chat_color$.
# Syntax: "type" "info" "chat color" "[expiration date]"

"flag" "l" "&x07"
"flag" "a" "&x07"
"flag" "d" "&x06"
"flag" "" "&x01"

[Name Customization]
# Here you can modify the name shown for certain players when using $custom_name$.
# Syntax: "type" "info" "custom name" "[expiration date]"

#"steam" "STEAM_0:1:49592792" &x04$name$
#"flag" "a" "&x04"

[Say/Say_Team Formats]
# Here you can specify the chat style for every user or flag.
# Syntax: "type" "info" "say format" "say_team format" "[expiration date]"

"flag" "l" "format_owner" "format_owner_team"
"flag" "a" "format_owner" "format_owner_team"
"noprefix" "" "format_player" "format_player_team"
"flag" "d" "format_admin" "format_admin_team"

Please help me
 
Последнее редактирование модератором:
Сообщения
157
Реакции
279
egcmasti, this plugin is mainly about the style of the chat, not protections or stuff like that. You can use another plugin for protection along with this one, but make sure to put it above this one in plugins.ini.

pheronix, you can't combine red, blue or white. Only one of these colors can be present in a chat message.
 
Сообщения
1,176
Реакции
2,144
Помог
57 раз(а)
pheronix, there is nothing to do here, it's my problem. Will fix it soon.
 
Сообщения
24
Реакции
-1
Неверный раздел форума
#define ARG_CITY "$city$"
//// crx_chatmanager.sma
// C:\Users\user\Desktop\amxmodx-amxmodx-1.8.2\amxmodx-1.8.2-base-windows\scripting\crx_chatmanager.sma(917) : error 017: undefined symbol "geoip_city"
// C:\Users\user\Desktop\amxmodx-amxmodx-1.8.2\amxmodx-1.8.2-base-windows\scripting\crx_chatmanager.sma(917) : error 088: number of arguments does not match definition
//
// 2 Errors.
// Could not locate output file compiled\crx_chatmanager.amx (compile failed).
How to fix?
How to combine with Modules SxGeo 2.2 , or is it not important?
 
Сообщения
157
Реакции
279
ganja_dypb, make sure you have the latest GeoIP version installed in your server. It compiles just fine for me.

There's currently no support for SxGeo or other alternatives. I may include it in a future update if there's a bigger demand for it.
 
Сообщения
52
Реакции
60
Помог
2 раз(а)
OciXCrom,
Если раскомментировать 40 и 41 строку, то получить такую ощибку
1586708783343.png
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу