/* * Admin mod script. Copyright (C) 2000, Alfred Reynolds. * $Id: plugin_dio_motm.sma,v 2.50.2 7/8/2001 dio Exp $ * */ /* This plugin will cycle messages to all clients at a timed interval. */ Commands: ~~~~~~~~~ admin_motm_reset: Reset the MOTM counter to 1. admin_motm_type [] Get/Set the typesay mode. On means it uses a typesay, Off uses a centersay. admin_motm_time [] Get/Set the time between MOTM messages. admin_motm_duration [] Get/Set the duration the message says on the client screen. admin_motm_wtf Tells you what the problem is when MOTM don't work. Setup: ~~~~~~ 1) Install the file as per the normal procedure defined in the AdminMod manual. 2) Make sure you have defined the admin_vault_file in your server.cfg as it is used to retain the last show message number through map changes. If this is not defined, the message number will not be retained over server restarts or map changes. You can set this like the following line: admin_vault_file "vault.ini" 3) Make sure you have defined file_access_read 1 in your server.cfg or AdminMod will not be able to read from the MOTM file. That setting should look like the following line: file_access_read 1 4) Create a file in your directory called MOTM.TXT. Linux users should make sure that the file name is UPPERCASE or it will not work. WIN32 users don't have to worry about that. In this file you can place one line per message. The ^n character is valid and will make the message go to multiple lines on the clients screen. You can optionally create files like de_dust.txt in your directory for custom map messages. These messages in these files will display in place of the MOTM.TXT for that map only. These are OPTIONAL. They do not have to exist. 4) Test your installation. Start the server and type the following command in the server console: admin_command admin_motm_wtf If any of the messages from MOTM say ERROR then you have a problem that must be corrected before the MOTM will work. Most likely you missed a step above and should be shot for not following instructions. If you get a warning, ignore it. If you get a warning and email me about it, I WILL ignore you for not reading these docs. 5) You can now spice up your MOTM file with colours if you so choose. The base colours are supported in this release. They are red, blue, green, white, yellow, purple and random. The way to specify these is to edit your MOTM file and prefix the lines with an exclamation mark (!), the colour of choice then ONE space. A sample line may look like this: !GREEN This plugin was created by^n[fah-q] Dio. The cAsE of the colour does not matter. If you specify an invalid colour, the colour will be ignored and the message will be displayed in green. I have included a sample MOTM.TXT file just to show you how it can be done. Credits: ~~~~~~~~ a) The original concept for this plugin was by Me (Dio) and was included in KaReL's admin.sma way back in AM v2.10. b) The counter for the next message does not affect map message files. They always start at the first line and the counter is not saved. Thanks to PissedOffMonkey for the map file idea c) The colours idea was from speedx. Thanks for hounding me.