Re: Lets get this stuff rolling! -
12-12-2004
A couple of tips...
1. engine->ClientCommand() sends a command to the client. This is not what you want. You want to send a command to the server AS THOUGH it came from a client (i.e. the "jointeam" stuff).
2. The ServerActivate() function in the empty plugin passes the maxClients value in as a parameter. You should store this off somewhere in a global variable and use that as the MAXCLIENTS value. This means that a bot plugin CANNOT be loaded and unloaded dynamically since the ServerActivate() will only be called when the server is starting up (and at map change). If you load the plugin while the server is already running, you won't know what maxClients is because ServerActivate won't ever be called.
botman
|