View Single Post
executing server command.
Old
  (#1)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default executing server command. - 21-04-2004

I'm trying to make a dll to run a server command when the server changes map (in ServerActivate like PMB said so)
but it keeps giving me:
Quote:
Error, Bad server command exec cstrike/de_aztec.cfg
and Here is the code.
Code:
void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax )
{
   char server_cmd[256];
   sprintf (server_cmd, "exec cstrike/%s.cfg", STRING (gpGlobals->mapname));
   SERVER_COMMAND (server_cmd);
   (*other_gFunctionTable.pfnServerActivate)(pEdictList, edictCount, clientMax);
}
I've been trying different things but I don't know much
so anyone know how to do this the right way?
  
Reply With Quote