How to setup a non-Steam Counter-Strike server
Revised October 23rd, 2003 by [LADT]Weasel
weasel@ladt.us
http://www.ladt.us
These instructions assume that:
- You know what the term HLDS means. (Hint: it means Half-Life Dedicated Server.)
- You already have the computer hardware up, running, operating system tested, etc.
- You already have your Internet connectivity up, running and tested.
- You know how to play Counter-Strike, and have actually played it successfully from a computer on your network.
- You will be running a dedicated server, not a non-dedicated server (aka listen-server).
- You will be hosting games for the older (non-Steam) Half-Life
& Counter-Strike clients.
- Your computer is using some form of Microsoft Windows (Windows’95, Windows’98, Windows ME, Windows NT 4.0, Windows 2000 or Windows XP). There is a Linux version of HLDS too - but it is not covered here.
- You are not running HLDS behind an Internet router/firewall. If you will be running HLDS behind an Internet router/firewall, there are other things you need to do
in addition to all this to make sure that players on the Internet can
access your server. For help addressing these issues refer to this other page.
- You will be running the separately downloaded version of HLDS - not the
version that is included with the Half-Life retail or Counter-Strike
retail CD's.
These instructions do not cover:
- Linux or any operating system other than Microsoft Windows.
- Setting-up your hardware, installing your operating system, etc.
- Setting-up and testing your Internet connection.
- How to play Counter-Strike.
- Non-dedicated servers (aka listen-servers).
- Anything having to do with Steam.
- Setting-up server-side modifications such as bots, Admin-Mod,
AMX-Mod, HLGuard, etc.
- How to make HLDS work behind an Internet router/firewall. If you will be running HLDS behind an Internet router/firewall, there are other things you need to do
in addition to all this to make sure that players on the Internet can access your server. For help addressing these issues refer to
this other page.
This section explains how to setup HLDS (in a very basic way) to run a dedicated server for
Counter-Strike.
Setting-up a Counter-Strike server is very similar to setting-up a Half-Life server.
There are some different parameters in the configuration files, and a
command-line parameter that must be used when launching HLDS to tell it to host
a Counter-Strike game instead of a Half-Life game.
- Install the latest version of HLDS Primary Server. Currently, this is hlserver4111.exe. If you don't have it already, go to
FilePlanet and search for it. Be sure to install it to the default location (c:\hlserver)
- Install the latest version of the Counter-Strike mod. Currently, this is csv15full.exe. If you don't have it already, go to
FilePlanet and search for it. Be sure to install it to the default location (c:\hlserver\cstrike)
- Make backup copies of your configuration files. Files that you should keep backup copies of include:
c:\hlserver\cstrike\autoexec.cfg, c:\hlserver\cstrike\server.cfg,
c:\hlserver\cstrike\game.cfg, c:\hlserver\cstrike\mapcycle.txt and
c:\hlserver\cstrike\motd.txt. Some of these files might not exist yet (since you haven't created them). If they do, back them up somewhere. If they don't exist yet, don't worry about them. You may have similar files with the same names in different folders on your computer. Be sure to edit only the files that are in the
c:\hlserver\cstrike folder.
-
Using Windows Notepad (not Microsoft Word or WordPad!), create a new
c:\hlserver\cstrike\autoexec.cfg file. In this file, you need to place a few commands
that HLDS will use for start-up parameters. The only stuff you put in this file, is things that you either can’t or wouldn’t change during the game. Each parameter gets entered one-per-line. First comes the parameter name (known as a CVAR), then some white-space (spaces or tabs) then the value you want to assign to it. Text values that include spaces must be enclosed in quotes. I generally put everything in quotes. You can also comment-out parameters by putting "//" in front of them. A basic start-up might be something
like this:
hostname "Bad-Ass Counter-Strike!"
maxplayers "16"
mp_teamplay "21"
pauseable "0"
log "on"
//sv_password "player password"
//rcon_password "administrator password"
map "de_dust"
|
Here’s what some of that means:
- On the sever list that players use to find servers, show this server’s name as
"Bad-Ass Counter-Strike!"
- Set the maximum number of players to 16.
- Do not allow players to pause the game (why it’s even an option, I don’t know).
- Turn logging on - writes stuff to the c:\hlserver\cstrike\logs directory.
- Make the initial start-up map "de_dust". Please note that the map command must be the last line of the file.
- If you take the "//" off the first of the other two lines, it will set a password that the player’s must know to joint the game.
- If you take the "//" off the other line, it will enable remote console and set the password for it. This allows you to send commands to the server console from a client while actually playing the game.
-
Using Windows Notepad (not Microsoft Word or WordPad!), create a new
c:\hlserver\cstrike\server.cfg file. In this file, you place various other configuration parameters. The format is the same as with the autoexec.cfg file. A basic configuration might be:
// general HLDS stuff below here...
sv_contact "youremailaddress@yourdomain.com"
sv_aim "0"
sv_cheats "0"
mp_flashlight "1"
mp_footsteps "1"
mp_autocrosshair "1"
mp_timelimit "30"
mp_fraglimit "0"
// CS-specific stuff below here...
mp_autokick "1"
mp_autoteambalance "1"
mp_c4timer "45"
mp_forcechasecam "0"
mp_freezetime "6"
mp_friendlyfire "0"
mp_hostagepenalty "3"
mp_limitteams "2"
mp_logmessages "1"
mp_mapvoteratio "0.5"
mp_roundtime "5"
mp_tkpunish "1"
sv_restartround "0"
|
Here’s what some of that means (for meanings of CS-specific settings
see the Counter-Server
site):
- Provide an e-mail address for anybody who needs to contact the server operator (i.e. you)
- Disable automatic aiming of player shots (well duh!).
- Disable cheats (meaning the built-in Half-Life single-player cheats - not 3rd party hacks).
- Allow players to use the flashlight (really helps in dark maps).
- Allow players to see crosshairs (does not aim for them!)
- Go to the next map in the mapcycle.txt file after 30 minutes of game play.
- If set to something other than 0, when anybody’s scored reaches mp_fraglimit the server switches to the next map in the mapcycle.txt file.
-
Using Windows Notepad (not Microsoft Word or WordPad!), create a new
c:\hlserver\cstrike\mapcycle.txt file. In this file, you place the names of
maps that you want the server to cycle through whenever a time limit or frag limit is reached. You enter
each map name - one per line, like this:
|
de_dust
de_cbbl
cs_militia
cs_italy
|
-
Using Windows Notepad (not Microsoft Word or WordPad!), create a new
c:\hlserver\cstrike\motd.txt file. In this file, you place whatever message you want players connecting to your server to see
just before joining the game. You can’t control the formatting of the message, and I don’t believe it will word-wrap - so keep the lines short (less than 40 chars). You can also include blank lines. I suggest including an e-mail address for people to write if they want to report cheaters, etc. For example, something like:
Bad-Ass Counter-Strike!
youremailaddress@yourdomain.com
Don’t piss me off,
or you will be kicked!
Our map rotation is:
de_dust, de_cbbl,
cs_militia and cs_italy..
|
This message will be displayed for each player when they connect to the game.
- Backup your configuration files again..
- Create a Desktop or Start-Menu short-cut to launch HLDS. Make the
short-cut point to "c:\hlserver\hlds.exe -console -game cstrike".
The -console parameter tells HLDS to proceed without any further
prompting. The -game cstrike parameter tells HLDS to host a
Counter-Strike game instead of a normal Half-Life game. If you’re
running it on the default port (assumes you’re not running multiple
instances of HLDS), you won’t need any other command-line parameters.
Call the short-cut whatever works for you.
That’s it! Whenever you want start-up a Counter-Strike server, just launch the short-cut!
The information above only cover's the very basics, and only for simple installation using the
Windows platform. There are many more CVAR's and other setup options that are beyond what has been covered here. More information about various console commands, options and mod-specific information can be found at several of the following links:
Number of hits since July 26th, 2003: