Code:
// is today my birthday ? :D
if (IsMyBirthday ())
{
// send the "special birthday" welcome message to this client
MESSAGE_BEGIN (MSG_ONE_UNRELIABLE, GetUserMsgId ("TempEntity"), NULL, pClient);
WRITE_BYTE (TE_TEXTMESSAGE);
WRITE_BYTE (1); // channel
WRITE_SHORT (-8192); // x coordinates * 8192
WRITE_SHORT (-8192); // y coordinates * 8192
WRITE_BYTE (2); // effect (fade in/out)
WRITE_BYTE (255); // initial RED
WRITE_BYTE (255); // initial GREEN
WRITE_BYTE (255); // initial BLUE
WRITE_BYTE (1); // initial ALPHA
WRITE_BYTE (RANDOM_LONG (0, 255)); // effect RED
WRITE_BYTE (RANDOM_LONG (0, 255)); // effect GREEN
WRITE_BYTE (RANDOM_LONG (0, 255)); // effect BLUE
WRITE_BYTE (1); // effect ALPHA
WRITE_SHORT (25); // fade-in time in seconds * 256
WRITE_SHORT (50); // fade-out time in seconds * 256
WRITE_SHORT (2048); // hold time in seconds * 256
WRITE_SHORT (2048); // effect time in seconds * 256
// build the welcome text
char welcome_text[512];
sprintf (welcome_text, "%s\n"
"\n"
"\n"
"\n"
"Today is 28 february - it's the author's birthday!\n"
"Happy Birthday PMB !!!\n"
"Send him an email to pm@racc-ai.com", racc_welcometext);
WRITE_STRING (welcome_text); // it's my birthday!!
MESSAGE_END (); // end
// play the "special birthday" welcome sound on this client (hehe)
CLIENT_COMMAND (pClient, "play barney/coldone.wav\n");
}