** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
void(entity player) MotdInfo =
{
// nothing to do
};
void(entity player) MotdInit =
{
if (!USE_MODULE_MOTD) {
PlayerFlagSetFlag(self,PLAYER_PASSED_MOTD);
return;
}
// motd_motd *must* not be longer than 255 chars ! #jp#
motd_motd = "Welcome ! \n\nThis site is running \nServerModules (1.1.4).\nYou start as observer.\nPress fire to join the\ngame. \n\nHave a nice stay ... \n";
motd_duration = 5.5; // time the motd stays center-printed (in units of seconds)
// A scratch-board:
// 123456789#123456789#123456789#12345678
// "Welcome ! \n\n"
// "This site is running \n"
// "ServerModules (1.1.4).\n"
// "You start as observer.\n"
// "Press fire to join the\n"
// "game. \n\n"
// "Have a nice stay ... \n"
self.motd_start_time = time;
self.motd_centerprint_time = time - 2;
self.motd_status = self.motd_status | MOTD_MOTD;
};
void() MotdThink =
{
if (self.button0) {
centerprint(self,"");
PlayerFlagSetFlag(self,PLAYER_PASSED_MOTD);
}
if (self.player_flag & PLAYER_PASSED_MOTD) {
return;
}
if (self.motd_status & MOTD_MOTD) {
if (time < self.motd_start_time + motd_duration) {