View Single Post
Plugin Info:     Modification:          Category:          Approver:   Hawk552 (427)
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-24-2009 , 11:32   Server Messages by Leon McVeran
Reply With Quote #1

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.



Commands
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])

amx_list_msg
- lists all messages from the server_messages.txt into the console

amx_list_rule
- lists all rules from the server_messages.txt into the console

amx_list_info
- lists all informations from the server_messages.txt into the console


CVARs
sm_msg_mode "3"
- print location of the messages (0 - console, 1 - chat, 2 - center, 3 - hud)

sm_rule_mode "2"
- print location of the rules

sm_info_mode "2"
- print location of the informations

sm_msg_show "1"
- display automatically the messages from the server_messages.txt

sm_rule_show "1"
- display automatically the rules from the server_messages.txt

sm_info_show "1"
- display automatically the informations from the server_messages.txt

sm_min_activity "4320"
- 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.

sm_show_frequency "15"
- time in seconds between 2 automatically messages

sm_show_skip "2"
- 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)

sm_show_time "8"
- duration in seconds of a tutor and hud messages


Changelog
v1.0alpha (9.Apr.2009)
Start of this project

v1.0beta (22.Apr.2009)
Added: - messages in tutor-style (imported function from Condition Zero)

v1.0 (24.Apr.2009)
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.)

v1.1 (27.Apr.2009)
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)

v1.2 (5.May.2009)
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

v1.3 (12.Jun.2009)
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

v1.3a (25.Jun.2009)
Removed: - an additional admin-rights check caused of some problems with the cmd_access.ini

v1.4 (22.Sep.2009)
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".

v1.4a (23.Oct.2009)
Bugfixed: - Added a check on the Remove_TutorMsg-function to solve an fatal error.

v1.5 (24.Oct.2009)
Removed: - All stuff about the tutor (It should not allowed to distribute this content)


ToDo
- nothing ;-)


FAQ
Q: Can I add more messages/rules/informations?
A: 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

Q: How I can add the mapname, playername or servername to the messages?
A: 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

Q: I want to use russian, chinese or an other language which are not displayed. What can I do?
A: One of these post can help you. Post 1 Post 2


Have fun!



Download-Historie:
Previous Versions - unknown

v1.3a - round about 1100 times

v1.4 and v1.4a - round about 240 times
Attached Files
File Type: zip required_files.zip (9.7 KB, 6843 views)
File Type: sma Get Plugin or Get Source (server_messages.sma - 8590 views - 28.2 KB)
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 06-27-2010 at 04:45. Reason: Update to version 1.5
Leon M. is offline