Server Messages v1.5
by Leon McVeran
Content of Server Messages
This plugin is not really a new idea. You can download similar plugins on https://forums.alliedmods.net
or on www.amxmodx.org
. Server Messages shows important messages, informations or rules on clients. You can add a messages in different languages into a file (server_messages.txt). The using of a consecutive numbers is required. You can also send a custom messages to a specific client or group.
Special thanks to the members of "Alliedmods - Forum" for some suggestions and solutions.
Please don't PM me to request for a version with the tutor. The distribution of this files are not allowed. I will create some new files to release a version with the tutor, please be patient.
Valid values for @group (with case ignoring)
- for all players: @A or @ALL
- for all CTs: @C, @CT or @COUNTER
- for all Ts: @T, @TE, @TERROR or @TERRORIST
amx_print_custom <authid, nick, @group or #userid> <your message> [optional: <mode>]
- shows a custom message (default: mode - 4) (e.g. "amx_print_custom @T "You are a terrorist" " will shown "You are a terrorist" to all terrorists)
amx_print_msg <authid, nick, @group or #userid> <msg number> [optional: <mode>]
- shows a specific message from the server_messages.txt (default depends on sm_msg_mode) (e.g. "amx_print_msg @ALL 1" will shown SERVER_MSG_1 to all clients)
amx_print_rule <authid, nick, @group or #userid> <rule number> [optional: <mode>]
- shows a specific rule from the server_messages.txt (default depends on sm_rule_mode) (e.g. "amx_print_rule @CT 2" will shown SERVER_RULE_2 to all counter terrorists)
amx_print_info <authid, nick, @group or #userid> <info number> [optional: <mode>]
- shows a specific information from the server_messages.txt (default depends on sm_info_mode) (e.g. "amx_print_info Leon 3" will shown SERVER_INFO_3 to me [Leon])
- lists all messages from the server_messages.txt into the console
- lists all rules from the server_messages.txt into the console
- lists all informations from the server_messages.txt into the console
- print location of the messages (0 - console, 1 - chat, 2 - center, 3 - hud)
- print location of the rules
- print location of the informations
- display automatically the messages from the server_messages.txt
- display automatically the rules from the server_messages.txt
- display automatically the informations from the server_messages.txt
- clients who are longer played than the specified minutes, will not receive the automatically messages. Set sm_min_activity to 0 to disable this feature.
- time in seconds between 2 automatically messages
- skip a group of clients who shouldn't receive an automatically message (0 - skip no players, 1 - skip dead players, 2 or higher - skip live players)
- duration in seconds of a tutor and hud messages
Start of this project
Added: - messages in tutor-style (imported function from Condition Zero)
Added: - a function to shown random messages to dead players
Improved: - check if exists a messages (If we reached the second language the check will be aborted.)
Bugfixed: - a small fault in the "cmd_server_list"-function
Added: - a new CVAR "server_rule_prefix" to add a prefix on server rules
- now you can set a different mode and style in the commands amx_server_... instead of using the default settings
- using of the nvault database to determine player who visit the server first time. for this players will be replaced the tutor messages (mode 4) with hud messages (mode 3). set the CVAR "server_restart_msg" to 1 to show a message on affected players after they joined a team.
Improved: - using of MSG_ONE_UNREALIBLE instead of MSG_ONE (Thanks xPaw)
Bugfixed: - If you used one of the "amx_list_..." commands you got a channel overflow
Improved: - the automatically messages will be shown randomly
- some other functions to improve the cpu performance
Added: - some placeholders, which you can use in the server_messages.txt (#hostname#, #playername#, #nextmap#, #currentmap#, #time#, #timeleft#, #playtime#)
- a new CVAR "server_force_playback" to force playback of the sounds from tutor
Removed: - an additional admin-rights check caused of some problems with the cmd_access.ini
Completely revising of the project to increase the performance. In addition some CVAR's and commands have been renamed because their functions were changed. You will find some remarks to the new CVAR's and commands in the sections "CVARs" and "Commands".
Bugfixed: - Added a check on the Remove_TutorMsg-function to solve an fatal error.
Removed: - All stuff about the tutor (It should not allowed to distribute this content)
- nothing ;-)
Can I add more messages/rules/informations?
Yes of course, open the server_messages.txt (../cstrike/addons/amxmodx/data/lang) and add your message/rule/information. Three things are very important, if you ignore them it could result in an error.
1. You must use a consecutive numbering. If you would like to add a new rule and it is exists SERVER_RULE_1, SERVER_RULE_2 and SERVER_RULE_3, you must begin your new rule with SERVER_RULE_4. Example: SERVER_RULE_4 = Bugusing are not allowed.
2. You can use maximal 256 chars, for chat and tutor messages maximal 180 chars.
3. You must add this rule to every language key
How I can add the mapname, playername or servername to the messages?
You can use in the messages one of the following placeholders. All placeholders without quotes.
"#hostname#" - Name of the server, "#playername#" - Name of the player who got the message, "#nextmap#" - Name of the next map (required nextmap.amxx), "#currentmap#" - Name of the current map (required nextmap.amxx), "#time#" - Current date and time, "#timeleft#" - Left time until mapchange, "#playtime#" - Session time of the player who got the message
I want to use russian, chinese or an other language which are not displayed. What can I do?
One of these post can help you. Post 1 Post 2
Previous Versions - unknown
v1.3a - round about 1100 times
v1.4 and v1.4a - round about 240 times