.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   executing server command. (http://forums.bots-united.com/showthread.php?t=1461)

sPlOrYgOn 21-04-2004 03:27

executing server command.
 
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?

Pierre-Marie Baty 21-04-2004 05:18

Re: executing server command.
 
You forgot the "\n" at the trailing end of the server command... :)

sPlOrYgOn 21-04-2004 05:31

Re: executing server command.
 
Thanks I'll try it as soon as I get on windows..


All times are GMT +2. The time now is 17:21.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.