Navigation

 OnJoin Game Message Feature Type: Coding Tutorials     Added: 24/01  
  Author: Corven 

Briefly shows a message when the client first joins.

Tell me

Code to be Added or Changed

g_client.c

Find the function and then look down it for these lines:

// the first spawn should be at a good looking spot
if ( !client->pers.initialSpawn && client->pers.localClient ) {
client->pers.initialSpawn = qtrue;
spawnPoint = SelectInitialSpawnPoint( spawn_origin, spawn_angles );

This is what is going to happen when the player first joins the game, so this is a good spot to add our joining message, like this:

// the first spawn should be at a good looking spot
if ( !client->pers.initialSpawn && client->pers.localClient ) {
client->pers.initialSpawn = qtrue;
spawnPoint = SelectInitialSpawnPoint( spawn_origin, spawn_angles );
trap_SendServerCommand( client->ps.clientNum, "print "Eternal Arena! n" S_COLOR_RED "http://www.q3center.com/ea/n"" );

In my example, it will show the message in red like this:
Eternal Arena!
http://www.q3center.com/ea/

Comments »



  Page 1

  Comments ( 0 )


  Features Index

  Home

Copyright © 2001 MGON International AB - Privacy statement