Introduction: HLDS Counter Strike 1.6 Server
So you have been playing Counter Strike for a while and are thinking about setting up your own server. There are many guides on installing a Half Life Dedicated Server (HLDS) all over the internet, the one I followed is;
but there wasn't one on Instructables! So here it is to help generate more traffic to this site!
NOTE: Please post all questions regarding errors on the following forum:
You will learn:
How to install a HLDS
How to run a HLDS
Configure your Router for HLDS
Set up a Static IP address for HLDS
Install AMX MOD X
-bullet damage plug in
-bullet whiz plug in
Install POD BOT
Obviously you will need a computer.
-Microsoft Windows XP Pro (it can be done on other Windows OS)
-512MB RAM Minimum
-7200RPM Hard Drive 20GB Minimum
-Internet Connection (DSL or grater recommended)
-Video Card (Optional) It will relieve Strain on the CPU and RAM
You will also need to be able access and configure your Router. This is the device that provides your Internet connection.
NOTE: You will need two computers to be exact. One to run the server and the other to run the game! It is possible to run both the server and the game form the same computer but it strains the CPU and is not recommended.
Read on to begin!
Step 1: Static IP Adress
You will first want to set up a Static IP address.
'Go to 'Start" -> 'RUN' -> type 'cmd' without to quotes-> ENTER
You are now in the command prompt. See picture. Now type 'ipconfig /all' without the quotes.
Look for the following and write down:
EDIT: You do not need to write down your IP address. We will be changing it. Everytime you turn on your computer your network automaticaly assisgns you an IP address. You will want to choose an IP address that is not likely to be assigned or else you may have big problems!
1.Now go to 'Start' -> 'Control Panel'
2.Find 'Network and Internet Connections'
3.Find 'Network Connections'
4.Find The connection you use for the Internet if more than one. RIGHT click and select PROPERTIES
5.Select 'Internet Protocol' from list and then 'Properties'
6.Check 'Static IP address'
7.Fill out information that was collected from ipconfig /all
EDIT: for IP address put something with the highest possible number. 192.168.254.253 for example.
Now test your connection to make sure it works by going going to the internet.
-Works? good now move on.
-Doesn't work? you filled out the wrong number. Try again.
Step 2: Now Go Get HLDSUpdaterTool
Step 3: Run HLDS Update Tool.
Just as the title says. Click to run and follow on screen instructions. This will not install the server but just sets up the basic files and programs needed on you C:\ drive.
Step 4: Now to Install the Server
In this step you will finally install the HLDS server for Counter Strike 1.6.
1.Open up the command prompt again. 'Start' -> 'Run' -> type 'cmd' ->enter
2.Type or copy and paste in the command prompt this code:
cd C:\Program Files\Valve\HLServer
3. now type or copy and paste this code and hit enter again:
hldsupdatetool.exe -command update -game cstrike -dir .
Don't forget the space and period after dir
4.The Counter Strike Server Files will now begin to install. DO NOT EXIT THE COMMAND PROMPT. Don't worry, if you do just start again at Number 1.
This is a rather lager file ~300MB so it will take time. For me it took ~20 minutes.
5. When the prompt says HLDS up to date you can exit.
Step 5: Server.cfg
Now go to where the files where all downloaded:
Find the file named server.cfg To open click on it and chose select a program and then find notepad. Get used to notepad, it comes in handy for a HLDS server and many more computer tasks.
Your server.cfg file will contain some CVARs for customizing your server. Copy and paste the following, its long, and over write the original text in server.cfg. These CVARs offer more customization of your server!
CODE Don't Copy this line.
// Use this file to configure your DEDICATED server.
// This config file is executed on server start.
// This is a comment
// default server name. Change to "Bob's Server", etc.
hostname "Counter-Strike 1.6 Server"
//sv_lan <0/1> 0=Public/LAN, 1=LAN Default: 0
// sv_contact <email/web address> Contact email for server admin
// sv_region <1-7> - The region of the world to report the server in.
// -1 World
// 0 US East coast
// 1 US West coast
// 2 South America
// 3 Europe
// 4 Asia
// 5 Australia
// 6 Middle East
// 7 Africa
// mp_buytime <seconds> - The amount of time to allow purchasing weapons/equipment on round start
// mp_c4timer <seconds> - How long before the c4 explodes
// mp_timelimit <minutes> - How long each map should be played before switching levels
// mp_freezetime <seconds> - How long players are unable to move during round starts
//mp_roundtime <1-9> How much time in minutes does a round last. Default: 5
// mp_startmoney <money> - Specify how much money players start off with
//mp_friendlyfire <0/1> Turn on/off friendlyfire. Default: Off
//mp_footsteps <0/1> Turn on/off footsteps. Default: On
//mp_flashlight <0/1> Turn on/off the ability for clients to use flashlight. Default: Off
//mp_fraglimit <##> Amount of frags a player can exceed before changing maps. Default: 0
//mp_maxrounds <##> Amount of round to play before server changes maps. Default: 0
//mp_winlimit <0-20> Max number of rounds one team can win before server changes maps. Default: 0
// mp_spawnprotectiontime Time in seconds to Kick players who team-kill after round restart. Default: 5
// mp_autoteambalance <0/1> Force clients to auto-join the opposite team if they are not balanced. Default: On
//mp_limitteams <0-20> Max # of players 1 team can have over another. Default: 2
//mp_autokick <0/1> Kick idle/team-killing players. Default Off
//mp_tkpunish <0/1> Punish TK'ers on next round? Default: On
//mp_hostagepenalty <##> How many hostages a Terrorist can kill before being kicked, 0 to disable. Default: 5
// disable autoaim
// sv_cheats <0/1> - Whether to allow game cheat commands to be used by clients. 0 = off | 1 = on
//sv_voiceenable <0/1> Allow clients to use mic. Default: 1
//sv_alltalk <0/1> Players can hear all other players, no team restrictions. Default: Off
//sv_voicecodec Specifies which voice codec DLL to use in a game. Set to the name of the DLL without the extension.. Default:voice_speex
//sv_voicequality <1-5> the bps of the voice.
//mp_chattime <0-120> amount of time in seconds players can chat after the game is over. Lower value = faster map load change. Default: 10
//sv_gravity World Gravity Default: 800
//sv_maxvelocity Maximum speed any ballistically moving object is allowed to attain per axis. Default: 3500
//sv_maxspeed Maximum speed a player can move. Default: 320
//decalfrequency Amount of time in seconds a player can spray their decal. Default: 10
//sv_consistency <0/1> Force cleints to pass consistency check for critical files before joining server? Default: 0
//sv_timeout <##> After this many seconds without a message from a client, the client is dropped. Default: 65
//mp_playerid <0/1/2> Controls what information player see in the status bar: 0 all names; 1 team names; 2 no names. Default: 0
// sv_pausable <0/1> - Whether to allow clients to pause the server. 0 = off | 1 = on
//sv_allowupload <0/1> Allow clients to upload their custom decals to the server. Default: 1
//sv_allowdownload <0/1> Allow clients to downnload files. Default: 1
//sv_unlag <0/1> Enables player lag compensation. Default: 1
//mp_allowspectators <0/1> Allow spectators on the server. Default: 1
//mp_forcecamera <0/1> Force dead players to first person mode, effectively disabling freelook. Default: Off
//sv_hltv <0/1> Enables HLTV on the server. Default: 0
//sv_minrate <0-25000> Min bandwidth rate allowed on server. Default: 0 (unlimited)
// sv_maxrate <1000-25000> - The maximum bandwidth rate the server is allowed to transmit to clients
//sv_maxupdaterate Maximum updates per second that the server will allow. Default: 60
//sv_minupdaterate Minimum updates per second that the server will allow. Default: 10
//sys_ticrate Max FPS (1000 Max) the server is to render
// log <on/off> Enable server logging? Default: Off
//sv_logbans <0/1> Log server bans in the server logs. Default: 0
// sv_logecho <0/1> Echo log information to the console. Default: 1
// sv_logfile <0/1> Log server information in the log file. Default: 1
//sv_log_onefile <0/1> Log server information to only one file. Default: 0
//sv_logsdir Folder in the game directory where server logs will be stored.
//rcon_password Set rcon passsword. Leave blank to disable rcon
//sv_rcon_banpenalty <mins> Number of minutes to ban users who fail rcon authentication. Default: 0
//sv_rcon_maxfailures <0-20> Max number of times a user can fail rcon authentication before being banned. Default: 10
//sv_rcon_minfailures <0-20> Number of times a user can fail rcon authentication in sv_rcon_minfailuretime before being banned. Default: 5
//sv_rcon_minfailuretime <1-seconds> Number of seconds to track failed rcon authentications. Default: 30
// lists of banned players.
// load ban files
END OF CODE: Don't copy this line.
Now save and look though all the CVARs. They are all explained and most of them you will not need to change, but you can. It is recommended that you change the servers name and most of the subsection labeled ROUND. Make sure to change the location to match up with you servers location! It is under GENERAL.
Step 6: Starting the Server
Now the part you have been waiting for. Starting the server.
1. Go to C:\Program Files\Valve\HLServer
2. Find Program called HLDS
3. RIGHT click on it and create a short cut. Drag the shot cut to the desktop.
4. RIGHT click on the short cut and go to properties.
5. In the target field add the following
"C:\Program Files\Valve\HLServer\hlds.exe" -console -game cstrike -ip 192.168.254.253 -port 27015 +maxplayers 12 +map cs_assault
This will start the server in the Command Prompt from earlier, conserves system resources. The game will be counter strike with the IP address of 192.168.254.253. You need to change this to match your IP address from ipconfig /all. There will be an maximum of 12 players and the starting map will be cs_assault.
Note about Max players:
Steam recommends the following:
# 128k uplink = 4 players
# 256k uplink = 7 players
# 320k uplink = 9 players
# 512k uplink = 14 players
# 768k uplink = 21 players
# 1024k uplink = 28 player
# 1140k uplink = 32 players
A general rule of thumb is 35.5 kbs per player. What does this mean? This is you Internet speed. Preferably you upload speed. To find you speed go to DSL Reports and test with a test server nearest you. Use the results to determine your max players.
Now you can click apply and then OK. To start the server just double click the icon and it will start automatically. Success!
To join your server simply start up the computer you will be playing on. Start Steam and find 'Servers' click on favorites tab and add the IP address of you server to 'add a server' Don't forget to add :27015 after you IP address. Mine looks like this. 192.168.254.253:27015 Now just connect to your server.
To get others to join you will need to complete a few more steps.
Extra: You may want to have your server start automatically when Windows Starts. Doing this is easy! Go to Start -> All Programs -> Startup and copy the desktop short cut here. You will also want to do the same with Windows Media Player. By having media player running in the background you can boost FPS significantly and you don't even have to be playing a song! What have you got to lose.
Step 7: Port Forwarding
You must configure your router for Port Forwarding. This tells the Router that when someone requests access to Port 27015 it will allow access and send the data to your server and not the other computers on your network. Port Forwarding depends upon your Router Manufacturer and your ISP. This is a general guide of how to Forward a Port on a SpeedStream 6520 for Frontier Net Internet Service Provider. For you model go to the following web site and select your Manufacture along with your model. Please read this anyway so you know what port to open and what protocols to select.
First open up your web browser. Now remember the number that you wrote down for Default Gateway. Type this in the address bar and hit enter. You will see a screen prompt for a user name and a password. The default user name and password is 'admin' . If this does not work the best advice I can give you is to Google your Router and to contact your ISP, if you rent the router form them, or the Routers Manufacture.
Now this is where it may differ from your model. Find a feature that has something to do with Ports, security or address translation. For my model I go to security. Yours may differ. Again follow the online guide.
The port to forward is 27015, forward this to your servers IP address (192.168.254.253) You need to select TCP and UDP protocols. Also you will want to disable your routers firewall for the server. My Router had a DMZ (Demilitarized Zone) that allows a certain IP address on my network to bypass the firewall. Try to find something like that.
Now everything should be set for a basic HLDS. Try to connect and make sure that you can still connect. In order to have friends connect you need to give them another IP address, 192.168.254.253 is you private IP, they need your public.
Find You IP
Now add :27015 after this number and give this to your friends. Mine is 184.108.40.206:27015 The same way that you connected to your server is how they should connect.
There You go a basic HLDS. Now you may want to just stop here and be happy or maybe you want to customize it a little more. Say add custom maps and features. The next steps are optional. I will show you how to install maps, AMX MOD X and PODBot along with a two plugins for AMX.
Step 8: Adding Maps
Adding maps are simple. Search for Counter Strike Maps on Google or go to the following web site. There are many maps available there:
Download to you desktop and then
unzip or unpack to maps to C:\Program Files\Valve\HLServer\cstrike This is for the maps that contain many folders. The folders should look similar to some of the folders in C:\Program Files\Valve\HLServer\cstrike
If it is just files with the prefix .bsp (cs_assault.bsp) add them to the folder called maps in C:\Program Files\Valve\HLServer\cstrike.
For more instructions on installing maps go to here:
Just as you can add maps yo can also remover maps by going to C:\Program Files\Valve\HLServer\cstrike\maps and removing the map. DON'T remove any other files from the other folders that you may have installed to, some maps share such things as sound clips and models. If you are 100% certain that you can remove these files by all means do. But if a map calls for these and they are missing your server will crash!
Now you are not done. You will need to edit the file called mapcycle. Add the name of any map you have downloaded or remove the name of the maps you have deleted. Make sure to spell them correctly. The order they appear on the list is the order in which they will play on your server.
To change the map in game go to the console by pressing '~' and type map <map name> such as map cs_assault. This will change the map to cs_assault.
Now you have installed Maps. Next we will be installing AMX MOD X. This will add many custom features such as an easier way to change maps!
Step 9: AMX MOD X
You must have played on those servers that play a sound when you get a head shot or show your damage at the end of each round. These servers are using AMX MOD X. By itself AMX only shows the damage statistics and allows control by an admin; slapping, slaying and banning are some of the features along with map change. This step will show you how to install AMX MOD X and two pugins called bullet damage and bullet whiz. After that you can install any plugin you wish.
I would provide a direct link or all the folders for quick download but they may be updated at times and those links and files would go bad so you will have to do it the old fashioned way.
First you need to get Metamod. Download the latest Windows binary by following the previews link.
And the following to C:\Program FIles\Valve\HLServer\cstrike
-new folder named addons
-in addons a folder named metamod
-in metamod a folder named dlls and a notepad file named plugins.ini
-add the downloaded file to the dlls folder
-go to C:\Program FIles\Valve\HLServer\cstrike and find the file named liblist.gam
-open file with notepad and find this line
replace with this line
-in the file you created called plugins.ins (C:\Program FIles\Valve\HLServer\cstrike \addons\metamod) add the following line:
-you have installed Metamod. Now to install AMX:
Go to this link and download the following two files
1. AMX Mod X Base for Windows
2. Counter-Strike Addon for Windows
Extract the downloaded files to C:\Program Files\Valve\HLServer\cstrike.
Make sure that you did not lose the files form to previous steps. If you did reinstall Metamod again.
AMX is now installed!
Installing Plugins are easy! Download these two files and follow the directions below.
Open the file labeled bullet_damage.sma with notepad. Now to configure to your liking. If you wish to see live damage done and received do noting and exit. If you wish to only see damage done add // before the line:
so it will look like this
Place this file in:
run the program compile found in this file.
find file named bullet_damage.amxx and place in:
Find file named plugins.cfg open with notepad and scroll down to the bottom and add the following line and save:
Find server.cfg scroll down and add the following and save:
//show live bullet damage
This plug in is now installed.
For Bullet Whiz place the sound files in:
Open plugins.ini again and add the following at the bottom under bullet_damage.amxx and save:
Open server.cfg and add the following under the last thing you added:
//amx_bulletwhizz (D: 1) - on/off plugin
//amx_bulletwhizz_dis (D: 35) - max distance to hear the whizz sound
The bullet_damage plug in will show live damage being done and received if you configured it that way.
The bullet_whiz plugin will play a whizzing sound when bullets pass nearby.
These two plugins are my favorite and work very well. Of coarse you can not install them if you like.
Now both plugins are installed. Most plugins are installed this way and plugins can be found at the following link:
Step 10: AMX Commands
Here is a list of basic AMX commands you will want to use. To use type them into your console (by pressing '~' first) when in game.
NOTE: In order to access these commands you need to make yourself an admin on your server. Join your server and in console type 'status' Find your nick name and copy down your steam id (STEAM_X:X:XXXXXX) go to:
find the file named users.cfg and add your Steam ID like the file tells you to.
amx_help -displays a list of commands and their functions. Very helpful.
amx_mapmenu -displays all the maps from your server so you can switch to them. You will need to do the following before the AMX map menu works:
find mapcycle and open with notepad. Copy contents.
find maps.cfg and open using notepad and paste the contents of mapcycle.
amx_statscfgmenu -a list of all to stats the server can display. In order to see stats with POD Bot you will need to configure amx.cfg by changing this CVARs: csstats_rankbots (turn it on by placing a 1 after it)
There are many more commands but these are the ones I use the most.
Search AMX for more.
Step 11: POD Bot
So now you can play on your server but there are not always people you can play with on your server. By installing POD Bot you will be able to play on your server any time.
First you will need Metamod from the previous step.
Go to the following link and download the following file to your desktop:
Add the following to plugins.ini and save:
POD Bot will now load automatically when the server starts.
You can configure POD Bot setting much like you did server settings by going to:
and opening podbot.cfg with notepad. Read though and change as you like. I suggest at least enabling auto kill so that when you die the round will end and you won't have to wait. Make the auto kill time 5seconds.
Now in order for bots to work with your maps they need to have a way point file for that specific map so they know where to go. Finding and downloading most way point files are easy!
Go to cs-maps.org and search for your map. You should see in the search results your map and a file with the prefix 'wp'. If your map is cs_assault the way point file will be names wp_cs_assault. Download and extract to:
You will notice that there are already way points there. The pre-installed maps already have the way points so unless you added maps you will not need to add way points.
If you can't find a way point file for you map do a Google search for it or search at this forum:
Way Point Forum
if you still cant find it post to the forum requesting one. Make sure to add a link of where you got the map you want the way point for!
Step 12: Done
That's it! By now you should have a functioning server. If you are having difficulties look for the answers on the following forum:
Steam HLDS Forum
A bit about my server:
I am using a Dell Optiplex 170L to run my HLDS wiht the following specs:
-Westr DIgital 320GB SATA 3Gb/s Hard Drive. Not what I originally started with but due to a resent HDD failure I had to get a new one. BACK UP YOUR SERVERS FILES ON A CD OR USB DRIVE.
-Nvidia GeForce 6200 256MB Video Card
-Windows XP Pro SP2 Version 2002
-AVG Free 7.5 Anti-Virus
-DSL Internet Connection (1077 kbps Download, 382 kbps Upload)
-I installed a HDD fan and a case fan (See Pics) for extra cooling
Thanks for reading this Instructable and I hope even if you don't set up your own server you at least learned something, I know I did. If you have any questions feel free to ask me. I will try to answer them if I can.
Any Comments are welcome. If you see an error or you think a piece of code is not working tell me. This was a longer Instructable then I expected and It will be difficult for me to catch every error.
NOTE: None of the software; plugins, AMX, POD Bot" are mine and are distributed freely across the Internet. I am not responsible for an damage a HLDS server may cause to your computer (There has been none to mine) and for any rules you may be violating by running a server without permission from your ISP.
Step 13: 3 Months Later....
This page has been added after the initial making of this Instructalble. After 3 months of running a HLDS constantly I have shut down due to an networking problem. In this section I will share a few things I learned and quite possibly go on a rant or two.
When I first started my server I had no one connect for weeks. At the time I did not have may STEAM friends so I could not invite may people to my server. Before my server was brought down due to networking I had many regular players and from ~2 to ~9 the server always had people on it. How did I do it in 3 months? Here are a few Keys to remember;
1. Play on your server ALL the time. I know it gets boring playing with bots but players will not connect if there are only bots.
2. Offer incentive to play. AMX automatically calculates rank and many players will strive to reach the top 15 but there also needs to be larger incentives. From the very beginning I offered Admin to any player who reaches #1. This was my key. I was very fortunate to find 5 very good players who took up admin. I had more then 5 admins but these ones were constantly on. One was on even more then me and many thought it was his server.
3. Careful when offering admin. Just because they are friends don't offer admin. At first i offered it unlimited to any one then it was for as long as you where #1 or if I liked you. I did get a few admins who played for 2 weeks and have never showed up again and 1 who was abusing and who I almost banned.
4. Make it unique and friendly. I installed Parachute and fixed the money to $16000 this gave everyone a fair enough chance. To make it unique i had automated messages that would inform about the servers location, how to become admin. Pretty much in game advertising. I also had "key works" When chatting there were specific works such as LOL that would display a special message, "Player is laughing, i hope it was funny" there are so many servers out there and you must make yours unique to stand out.
5. Good players. My admins helped with that. If you have an idiot driving away everyone else, kick them! You also need players who are fun. I had one who every so often would get me laughing so hard, that make the game fun!
That's about It. Now go out and make a server. Invite me and I will come and play!
MohamedM267 made it!