|
发表于 2003-9-18 19:05:36
|
显示全部楼层
来自 中国–广东–广州–海珠区
[] Variables you need to know about:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Variable: servercfgfile <filename>
Where: command line
Default: "server.cfg"
Example: +servercfgfile server27016.cfg
Desc: Specifies a file to use for configuring the server other then server.cfg. Also this file will be exec'd each map change rather then server.cfg
Variable: mapcyclefile <filename>
Where: command line startup
Default: "mapcycle.txt"
Example: +mapcyclefile mapcycle27016.txt
Desc: Specifies a file to use for the map cycle other then mapcycle.txt.
Variable: motdfile <filename>
Where: command line startup
Default: "motd.txt"
Example: +motdfile motd27016.txt
Desc: Specifies a file to use for the message-of-the-day other then motd.txt.
Variable: ip <ip address>
Where: command line startup
Default: "localhost"
Example: +ip 192.168.0.1
Desc: Specifies an IP address to use other then the default interface.
Variable: port <port number>
Where: command line startup
Default: "27015"
Example: +port 27016
Desc: Specifies a port number to use other then the default 27015.
Variable: logsdir <log file location>
Where: command line startup
Default: "hlds/%mod%/logs"
Example: +logsdir logs27016
Desc: Specifies a location for logs other then \%mod%\logs.
[] Example start-up's:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is an example of a startup w/ only one server running:
C:\HLServer\hlds.exe -game cstrike +maxplayers 16 +map de_dust
Here is an example of a startup on the same machine for the next server:
C:\HLServer\hlds.exe -game -port 27016 cstrike +servercfgfile server27016.cfg +logsdir logs27016 +mapcyclefile mapcycle27016.txt +motdfile motd27016.txt +maxplayers 16 +map cs_assault
And the next, etc.:
C:\HLServer\hlds.exe -game -port 27017 cstrike +servercfgfile server27017.cfg +logsdir logs27017 +mapcyclefile mapcycle27017.txt +motdfile motd27017.txt +maxplayers 16 +map de_dust
[] Notes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This info will work for the Linux and Win32 servers. For the examples, hlds.exe is used as well as DOS style drive letters and slash's. So for the *nix users out there, substitute hlds or hlds_run depending on which you use, as well as forward slashes "/" rather then back slashes "\" in the path. Counter-strike is the mod used for the examples. Substitute your mod with the -game switch if different and be aware of any additional command line switches your mod may require. Additional addon's such as Halfd and others are not in the scope of this document and may affect how the server is started up. This guide is simple and meant only to cover the basics of running multiple servers from a single install. It expects you already know how to set up a single stand alone server.
The reason for the naming structure is to keep the files together while doing a directory listing and the port number in the name provides easy identification as well. You can name these whatever you prefer. It should be noted that putting a dash in the name of the file such as server-27106.cfg causes that not to work, so no dashes. Also in this example I did not use the +ip switch. If the machine has multiple IP's and you intend to run only one server on each IP, then add that IP to the start up like this +ip XXX.XXX.XXX.XXX, and remove the +port switch. The port switch is only needed if you run more than one server on a single IP. On a LAN server, only ports 27015 through 27024 will show up in the in-game browser. If you run out of the ports in that range, assign another IP to the machine to have those ports available again on the second IP.
There is no method that I am aware of for using a different file in leu of the autoexec.cfg file. This file gets run at server startup automatically for all your servers. So only put things in here that are the same on all the servers you run such as log on, rcon_password, etc.
[] Reference: (I use AMX now, the AM info may be outdated)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Multiple Metamod config info per one installation can he found here.
- Multiple Adminmod configs can be specified in the additional serverXXXXX.cfg's you make from above. In each serverXXXXX.cfg file, you can specify different versions of these files:
users.ini
plugin.ini
ips.ini
maps.ini
models.ini
- Multiple AMX config info. AMX changes often so this info is current for 0.8.4 through 0.8.6 support's multiple plugins.ini, modules.ini and cs_stats.dat (the statsme info) files. This is specified on the server startup using the +localinfo switch. See Below:
+localinfo csstats csstats_27016.dat - This keeps the statsme info seperate for each server.
+localinfo amx_plugins plugins_27016.ini - This allows you to use a seperate plugin file for each server.
+localinfo amx_modules modules_27016.ini - This allows you to use a seperate plugin file for each server.
Currently you cannot specify a seperate admin.cfg file per each server. However you can accomplish the same thing by taking the entries out of the admin.cfg that you want different in each server and put them in the serverXXXXX.cfg file. So you can have different admin's for each server (among other things) by doing it this way.
If you feel there are any errors in this guide or feel that there is additional info that should be included, please email me at m0gely@telestream.com. |
|