[GUIDE] How To Create a Counter-Strike Server

Baghi

Baba Yaga
Mar 22, 2011
6,848
3
44
Karachi
Creating CS 1.6 Server on Windows

Creating Counter-Strike 1.6 Server on Windows

Table of Contents
  1. Prerequisites
  2. Downloading and Installing The Server
  3. Configuring The Server
  4. Starting The Server
  5. Connecting to The Server

Prerequisites

  • Required ports must be forwarded for online gaming
  • A computer running at least 2.2GHz processor preferably dual-core with 2GB of minimum RAM
  • 7200 RPM Hard Disk Drive with 8MB or more cache with 2GB of free space
  • 1MB upstream rate for a 14-16 slot server

Downloading and Installing The Server

Create a new folder in your computer, in D:\CS_Server for example

Download SteamCMD (Windows) and extract it's contents in above created folder

After downloading and extracting go onto said folder (e.g. D:\CS_Server) right click on blank area while holding Shift key and select Open command window here

When command window opens type: steamcmd and let the tool update it's contents (approximately 8.5 MB)

Once it's done updating, it'll put you in "Steam>". You can then, enter following login details in order to download the required binaries. To do that, type: login anonymous

Upon successful login, you'll get a message saying "Logged in OK"

Type following commands one by one and press enter after each
  • force_install_dir .\server\
  • app_set_config 90 mod cstrike
  • app_update 90 validate

Once done, type quit to properly log off of the Steam servers.

Configuring The Server

server.cfg - this file contains all of your basic server settings. You can edit the file and make changes as per your likings using a text editor, such as Notepad.

This file is located in your "cstrike" folder. ".\server\cstrike" in our case.

Note: Red fonts are just comments to help you understand what CVAR does what, I'll be updating these from time to time so stay tuned. For the record though, words after slashes (//) are not executed by the server.

decalfrequency 15
hostname "My Sweet 1.6 Server" // This is is your server's name, change this to your desired name (this must be put in the quotes)
log off
pausable 0
rcon_password your_str0ng_pw // This is your Remote CONtrol password to administrate the server, this must not contain spaces or quotes
sys_ticrate 300 // This value decides at what fps your server renders. You can set it anywhere from 100 to 1000, your call

exec listip.cfg
exec banned.cfg

mp_allowspectators 0
mp_autokick 0
mp_autoteambalance 1
mp_buytime .5
mp_c4timer 35
mp_chattime 5
mp_footsteps 1
mp_forcechasecam 0
mp_flashlight 1
mp_freezetime 1
mp_friendlyfire 0
mp_hostagepenalty 0
mp_limitteams 1
mp_logdetail 0
mp_logmessages 0
// mp_maxrounds 21
mp_roundtime 2.5
mp_startmoney 800
mp_timelimit 30 // This CVAR describes for how long each map runs on the server
mp_tkpunish 0
mp_winlimit 0

sv_aim 0
sv_allowdownload 1
sv_allowupload 0
sv_alltalk 0
sv_cheats 0
sv_consistency 0
sv_contact "steamcmd.freeforums.org" // This is going to be your contanct address. Replace this with your valid email address or website/forum
// sv_downloadurl "http://****"
sv_hltv 0
sv_maxrate 15000 // This value depends TOTALLY on how good or bad internet connection you've, you can try anything from 3000 to 30000 and find out the best settings for your server
sv_maxupdaterate 30 // See above
sv_minupdaterate 15 // See above
sv_minrate 7500 // See above
sv_proxies 0
sv_region 255 // Set this to 0 for US - East, 1 for US - West, 2 for South America, 3 for Europe, 4 for Asia, 5 for Australia, 6 for Middle East, 7 for Africa. Default is 255 (world)
sv_voiceenable 1
sv_voicecodec voice_speex
sv_voicequality 3
sv_timeout 18
motd.txt - Message of The Day, the said message is displayed to every client who connects to your server.

This file is also located in the same place where "server.cfg" exist.

Open up the file, add these lines:
<html>
<head>
<title>Cstrike MOTD</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
color:#FFB000;
}
body {
background:#000000;
margin-left:8px;
margin-top:0px;
}
a {
text-decoration: underline;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
a:active {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
}
</style>
</head>
<body scroll="no">
<pre>
This is an example message
Powered by PakGamers @
www.pakgamers.com

<a href="http://www.pakgamers.com/forums/">visit Pakistan's Gamers Community</a>
</pre>
</body>
</html>
mapcycle.txt - If you've loads of custom maps or you want the server to run selective maps only, edit this file.

This is also located in the .\cstrike\ folder.

You can add maps like this:
de_dust2
de_inferno
de_aztec
de_train
// and so on..
Now maps will cycle in above mentioned order.

Note: you must not add .bsp extension at the end of the map name.

Starting The Server

Starting the server is a simple process; go to the server root directory (.\server\ in our case) and make a shortcut of hlds.exe. You do that by right-clicking on the said file and click "Create shortcut". Go to it's properties and in the "Target" field, type following parameters after "hlds.exe":
Code:
 -console -game cstrike -insecure +ip XXX.XXX.X.X +map de_train +maxplayers 16 +port 27015 +sv_lan 0 +mapchangecfgfile "server.cfg"
Note: +ip XXX.XXX.X.X must be changed to your local IP address. To find out this, go to command prompt then type ipconfig and it'll tell you what's your IPv4 Address; replace XXX.XXX.X.X with it and click OK.

Also, you must add a space in between hlds.exe and -console; should look like this:


Click OK and double-click the shortcut you just made.

This will start a 16 slot server on the de_train map. You can change the values to whatever you like.

Connecting to The Server

Go to whatismyip.org (link) and see what's your public IP address. Tell this to your friends and have fun online!

Note: You must join your server using your local IP address (e.g. 192.168.X.X in most cases).

Disclaimer: This is my work, you're not allowed to share this without mentioning the original source.
 
Last edited:

Amarog

Deviant
Feb 19, 2009
3,847
0
41
Behind You
It would have been more convenient if you would have used english -__-
Writing urdu like this makes it a little complex :/

Never-mind, I'll check it out after the exams :(
Exams are on the head :( Wish me luck :p
 
Last edited:

Baghi

Baba Yaga
Mar 22, 2011
6,848
3
44
Karachi
It would have been more convenient if you would have used english -__-
Writing urdu like this makes it a little complex :/

Never-mind, I'll check it out after the exams :(
Exams are on the head :( Wish me luck :p
Ugh? Complex, there're plenty "how tos" available on the internet already. And I don't feel embarrassed speaking my beloved native language.
 

Amarog

Deviant
Feb 19, 2009
3,847
0
41
Behind You
Ugh? Complex, there're plenty "how tos" available on the internet already. And I don't feel embarrassed speaking my beloved native language.
I don't say that its bad to speak your native language.
But this is an online English forum ;) You got to abide by the rules and its ways ;)

btw I did the downloading thing, now going ahead.

___________________________________

Hey I did exactly you said in the tut above.
But how do the non-steam users use the sv? -__-
If I try to connect through ---> 1921.168.1.2:27015 , it says some protocol problem.
 

Baghi

Baba Yaga
Mar 22, 2011
6,848
3
44
Karachi
bro how to apply amx mod and sxe inject on server
Yes. Will post a tutorial for that as well please be patient. :)

If you've any problem setting up server or even in running CS feel free to post here or drop me a PM. :)
 

Amarog

Deviant
Feb 19, 2009
3,847
0
41
Behind You
Here's what you gonna do next.

Download:


RAR Password:
Spoiler: show
pakgamers.com


Unzip anywhere on your hard disk let's take any dummy location like desktop after you uncompressed copy folder "cstrike" to your server folder where hlds.exe is. :)

Once all goes well now run your server and type "meta list" in console it should look like this:



Uploaded with ImageShack.us

All the best.

View attachment 41678
After this what to do next?
 
General chit-chat
Help Users
Pakgamers intro videos on our youtube channel
  • No one is chatting at the moment.
  • iampasha iampasha:
    Sono chi no sadame
    Link
  • CerebralTiger CerebralTiger:
    Yeah they tried to do something MOBA-ish, but it didn't really pay off.
    Link
  • Chandoo Chandoo:
    Pyra being a quasi-sports game kinda threw me off, not the kind of game i wanted to play
    Link
  • CerebralTiger CerebralTiger:
    Transistor's worth it imo. Didn't like Pyre, though. They aren't related, so you could just play Hades directly
    Link
  • Chandoo Chandoo:
    ive never played transistor, worth it ? or just jump into hades
    Link
  • CerebralTiger CerebralTiger:
    Yeah, it's similar to their previous games. Isometric roguelike ARPG.
    Link
  • Chandoo Chandoo:
    anyway, does Hades play like Bastion ? Reading good things but have no idea what kind of game it is
    Link
  • Chandoo Chandoo:
    hater and fakers, hater and fakers never change
    Link
  • Link
  • Chandoo Chandoo:
    rofl 😂
    Link
  • CerebralTiger CerebralTiger:
    Also Goldenhawk: who pays for Switch games, imma pirate this
    • Haha
    Reactions: Chandoo and Major Aly
    Link
  • CerebralTiger CerebralTiger:
    Goldenhawk: Chandoo ab kaun sa store lootay ga?
    Link
  • Link
  • CerebralTiger CerebralTiger:
    GoldenHawk said:
    Ik katray sey hi darya banta hai bas depress ho keh doob naa jana kaheen us mein
    Aisi baatein sirf kitaabon mein achi lagti hain :ROFLMAO:
    Link
  • Chandoo Chandoo:
    nai yar ap rakho, 3090 apki life ki sab se mehngi purchase hai, ap ko zyada zaroorat hogi (y)
    Link
  • GoldenHawk GoldenHawk:
    pehlay battay venmo kar deta
    • Haha
    Reactions: Necrokiller
    Link
  • GoldenHawk GoldenHawk:
    leh yeh sab $30 keh liya ?
    Link
  • Chandoo Chandoo:
    reactions badal raha hia bechara shouts ke, lagta hai zor lag raha hai 😂
    Link
  • Chandoo Chandoo:
    encro shout kyoo kar rahe ho direct pooch lo na dhote hue goldie ko :ROFLMAO:
    Link
  • Necrokiller Necrokiller:
    Ye kaam to usska cousin bhi nahi kar sakta lol
    Link
  • GoldenHawk GoldenHawk:
    haan shukar aap samaj gaye
    Link
  • Necrokiller Necrokiller:
    Digital store bechaara kese lootay lmao
    • Haha
    Reactions: GoldenHawk
    Link
  • Necrokiller Necrokiller:
    Goldie isse $30 bhej de remaster ke liye tarass raha hai
    • Like
    Reactions: GoldenHawk
    Link
  • Chandoo Chandoo:
    necro hai yaha pe apki dhoni karne k liye whenever needed 🙌
    Link
  • Chandoo Chandoo:
    koi masla nahi, ap ko jo bahana banaana hai nikalne ka :ROFLMAO:
    Link
    iampasha iampasha: Sono chi no sadame