With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: Tequila, sparcdr, torhu

Headshots in log/ Centerprints

Postby Nargajuna » Sun Oct 16, 2011 1:08 pm

Howdy Guys,
any dirty patches for 1.0 available ?

edit:
Headshots in logs works with
Code: Select all
/rcon g_debugdamage 1
Image
User avatar
Nargajuna
Newcomer
 
Posts: 4
Joined: Wed Jul 07, 2010 4:25 pm
Location: Germany



Re: Headshots in log/ Centerprints

Postby TheDoctor » Sun Oct 16, 2011 8:08 pm

Nargajuna wrote:Any dirty patches for centerprints in 1.0 available?


In code/server/sv_ccmds.c, add:
Code: Select all
static void SV_ConBig_f(void) {
   char   *p;
   char   text[1024];
   client_t   *cl;
   int clientnum;

   // make sure server is running
   if ( !com_sv_running->integer ) {
      Com_Printf( "Server is not running.\n" );
      return;
   }

   if ( Cmd_Argc() < 3 ) {
      Com_Printf ("Usage: big <clientid> <text>\n");
      return;
   }

   cl = SV_GetPlayerByNum();
   if (atoi(Cmd_Argv(1)) < 0) {
      cl = NULL;
   }

   strcpy (text, "^3");
   p = Cmd_ArgsFrom(2);

   if ( *p == '"' ) {
      p++;
      p[strlen(p)-1] = 0;
   }

   strcat(text, p);

   SV_SendServerCommand(cl, "cp "" S_COLOR_WHITE "%s\n"", text);
}
and add the line
Code: Select all
Cmd_AddCommand ("big", SV_ConBig_f);
to SV_AddOperatorCommands( void ) in the same file.
User avatar
TheDoctor
Smokin' Amigo!
 
Posts: 767
Joined: Sun Jun 06, 2010 3:31 am



Postby Nargajuna » Mon Oct 17, 2011 12:15 am

Image
Image
User avatar
Nargajuna
Newcomer
 
Posts: 4
Joined: Wed Jul 07, 2010 4:25 pm
Location: Germany




Return to Code

Show Sidebar
Show Sidebar

User Control Panel