Inside3D tutorials.
Created By: Timm 'Mr?' Stokke
eMail: hestokke@online.no
Difficulty Scale: Medium


Step 1
Every wanted to have a "Message of the Day" text display every time a client connected to you're server? Well, then check this tutorial out! The first thing you have to do is create a function that is called every frame (not the best way to do this but the simpelest)

find "void() PlayerPostThink =" and page all the way down to the bottom of the function (where it calls "CheckPowerUps ();") and put a line called "CheckMOTD ();" under it


Step 2
create a new function called "CheckMOTD" directly under the line that reads "float modelindex_eyes, modelindex_player" it ought to look like this
void() CheckMOTD =
{
    if ((self.motd_count < 6) && (self.motd_time < time)) // 6 == seconds MOTD will display
    {
        self.motd_time = time + 1;
        self.motd_count = self.motd_count + 1;
        centerprint(self, "Your message\n"); //Type in you're message here "\n" = new line
        return;
    }
};


Step 3
open Defs.qc and scroll ALL the way to the bottom (if you add a float too high in defs.qc it will crash your mod with a "progdefs.h out of date" error) and add motd_time and motd_count like
//
// triggers
//
.float		count;			// for counting triggers

.float		motd_count;
.float		motd_time;


Step 4
And that's it! Compile it, and load it up the usual way. Start a new map, and there you go! A MOTD text! One thing to remeber though, is that you CAN have colored text instead of the white one, although that's whole lot harder. Try nameFun, or another Qname eitor. Good luck!