Subscribe by RSS RSS Icon

How to make your own Counter Strike dedicated server on windows

It’s been a year already since I started playing Counter Strike and most of the times I play with my friends on my dedicated server hosted in my computer. So, here is a complete guide for all you guys who want to make your own Counter Strike (CS) dedicated server on windows, starting from installing and configuring CS, till making a web based ranking system. It doesn’t matter if it’s a pc or a laptop, as long as it has xp or vista. I haven’t tried it on windows 7, but I think it should.

Before we begin, these are the stuffs we’re gona cover in this guide:
  • Installing Counter-Strike: Source
  • Creating the server
  • Configuring the server
  • Installing Mani Admin Plugin (optional)
  • Intalling Metamod:Source
  • Intalling SourceMod
  • Installing Xampp
  • Intalling ActivePerl and DBD-mysql
  • Installing and configuring HLstatsX: CE
  • A bit of port forwarding
This guide contains two parts. Making the CS server and making the webhost. Okay, so now let’s get it started! ;)

Installing and configuring the CS server
  1. Download and install Counter-Strike: Source (installation instructions will be included). Let’s assume that you’ve installed in C:\Program Files\Counter-Strike Source\
  2. Go to C:\Program Files\Counter-Strike Source\ and look for srcds.exe. Right click and sent to desktop, which makes a shortcut on the desktop.
  3. Go to desktop, rename the srcds.exe shortcut to server, right click on it and go to properties.
  4. In the shortcut tab, add this line in the target field after the srcds.exe" part:
    -console -game cstrike +maxplayers 30 +map de_dust2 -secure

    shortcut

    -console: tells it to run as the console command interface, instead of the GUI, which takes more load than console.
    +maxplayers 30: how many players can join the game, in this case its 30.
    +map de_dust2: which map the server is going start with, in this case its de_dust2.
    -secure: secure the server with Valve Anti Cheat (VAC).
  5. Now it’s time make some basic settings for your server by using the server.cfg file in your C:\Program Files\Counter-Strike Source\cstrike\cfg\. If you don’t have that files, you can create it by using a cfgmaker to help you to generate it easily.
  6. Go to desktop and run the server shortcut. It should show up the console like the command prompt and starts to load some stuffs. If something goes wrong, go back to the step 4. After loading all those stuffs, run your Counter-Strike game, find your server in the LAN tab and join. Play around a bit; it’s just to check whether it works ;) So, basically your dedicated CS server is up and running on LAN, but it might not work through internet, when your friends try to join. Don’t worry; we’ll cover it up later. Shutdown the server by typing, exit in the console.
  7. This is an optional step, you may skip to step 9. Mani Admin Plugin makes it easier to manage the server, like kick, ban, change map, slap and more. Download Mani Admin Plugin and extract it into C:\Program Files\Counter-Strike Source\cstrike\. Go to your C:\Program Files\Counter-Strike Source\cstrike\addons\, open CreateVDF.exe, select cstrike and save it as mani_admin_plugin.vdf.
  8. Run the server and let everything gets loaded. If the server crashes, go back to step 7 and try installing a previous version of Mani Admin Plugin like v1.2 Beta O. After the server loads everything, to check whether Mani Admin Plugin was loaded, type:
    plugin_print
    ...and it should show something like:
    mani admin
    …or if it doesn’t, something is wrong with your installation. For troubleshooting, configuration and commands check the documentation. You can shutdown the server now.
  9. In order to make the HLstatsX in game ranking system to work, you need to have SourceMod, and SourceMod requires Metamod:Source. So let’s download Metamod:Source, installation instructions and troubleshooting can be found in AlliedModders Wiki.
  10. Download SourceMod and extract it into C:\Program Files\Counter-Strike Source\cstrike\. To check whether the addons are loaded, run your server and type:
    meta list
    …and it should show this line:
    meta list
    If it works, shutdown the server and proceed to next step, and if it doesn’t work, go back to step 9 or check out the AlliedModders Wiki.
  11. Download the HLstatsX: CE, extract it somewhere, and copy the sourcemod folder into C:\Program Files\Counter-Strike Source\cstrike\addons\.
The game server is now ready, and it’s time to setup the web server part now ;)

Installing and configuring the web server
  1. I’m gona’ use Xampp as the web server pakage. Download and install Xampp as to the instructions.
  2. HLstatsX Community Edition uses a Perl daemon to parse the log streamed from the game server”, so Perl has to be installed. You can use the Perl addon for Xampp, or use ActivePerl to run the perl scripts. I use ActivePerl and I recommend using it :)
  3. Open up Perl Package Manager (PPM) by typing ppm in the run. Search for dbd-mysql in the PPM, right click on it and install. Go to file, Run Marked Actions and you’re done!
    ppm
  4. Copy the web folder from the extracted HLstatsX file, into htdocs of your Xampp web server. Rename the folder to stats.
  5. I assume that your web server is working by now. So, go to http://localhost/phpmyadmin/ and make a new database. The username is root and there is no password by default. Let’s call this database, hlstatsx.
  6. Click on the hlstatsx database on the left side which you created, and go to the 'Import' tab on the top. Under the ‘File to import’, browse to the extracted HLstatsX folder, \sql\install.sql and ‘Go’.
  7. Open config.php, in your web server stats folder, with a notepad. Edit the file to match your settings:
    define("DB_NAME", "hlstatsx");
    define("DB_USER", "root"); - the default xampp username
    define("DB_PASS", ""); - the default xampp password is *none*
  8. Go to http://localhost/stats/hlstats.php?mode=admin and login as admin, with 123456 as the password. Add your server under game settings and play around a bit with the HLstatsX: CE settings.
    Server Address: your internal network IP
    Server Port: 27015
    Server Name & Rcon Password: See your server.cfg
    Game Mod: Sourcemod
  9. Go to your C:\Program Files\Counter-Strike Source\cstrike\cfg\ and open autoexec.cfg with a notepad. Add the following lines:
    log on
    logaddress_delall
    logaddress_add IP:PORT

    your IP will be the internal IP and the port can be 27500.
  10. Copy the perl folder from the extracted HLstatsX to the stats web server folder. Open hlstats.conf with a notepad and edit it to match your settings:
    DBHost "localhost"
    DBUsername "root"
    DBPassword ""
    DBName "hlstatsx"
    Port 27500
  11. Open up notepad and paste the following line:
    perl hlstats.pl
    ..save it as hlx_run.cmd in that folder. You may create a shortcut for the hlx_run.cmd in your desktop for easy use. Try running it. If it shows an error and closes, try checking your hlstats.conf, or if there is no error and if it doesn’t closes, it’s working!
Your game server and web server is now ready, but still you’re not done yet! ;) The last part is to open or forward your ports. To do that, you’ve to login into your router and set the ports. Most of the routers have the configuration for the web server and for Counter-Strike too, but if you don’t have or you don’t know, you can go to PortForward.com to get it done :)
For Counter-Strike server:
Protocol / Port start - Port end / Port Map
UDP / 1200-1200 / 1200
UDP / 27000-27015 / 27000
TCP / 27020-27039 / 27020

For web server:
Protocol / Port start - Port end / Port Map
TCP / 80-80 / 80
TCP / 443-443 / 443
You can check whether your web server is working by going to Hidemyass.com, enter your external IP and browse. You can get your external IP by going to Whatismyip.com. If you can access, that means its working! Once you are done, it’s time to finally start the server.
  1. Run the hlx_run and the CS server shortcut from the desktop.
  2. Run your CS game, join your server and add some bots.
  3. Minimize the game, go to http://localhost/stats/ and check the players and played times whether it matches. If it does, it’s working correctly, if it doesn’t, go back and check your steps carefully, because something is really screwed up!
  4. Tell your friends your IP and let the fun begin! :D If your IP is dynamic, its’ kinda annoying when your IP changes every time. So, you can use a free DNS service like afraid.org, which has many different kewl domains and they have a free DNS updating software so that, when every time your IP changes, it updates your DNS settings.
So, this is it! I hope this guide helped to make your own CS dedicated server and also about the web server too. If you have any questions, please drop a comment.

Ahoy! Its International Talk Like A Pirate Day! Arrr!!

Ahoy! Today is the International Talk Like A Pirate Day (ITLAPD)...arrr!! ITLAPD is a parodic holiday celebrated every year on September 19th. Many have been celebrating the ITLAPD around the world today, including Google, Facebook, Twitter and Friendfeed.

Pirate Google Searrrch..arrr!!
www.google.com/intl/xx-pirate/

to celebrate the ITLAPD, Facebook has even added the Pirate language feature which changes alot around...like the Logout part becomes Abandon Ship and Inbox becomes Bottle o' Messages. Wana' check it out? Just simply go to the bottom of your facebook page and change the language to English (Pirate) from English

for more info, check out the ITLAPD official website:
www.talklikeapirate.com

Tagged!! O_o

whoah...!! m tagged by Cielo Sama :P laayee!! XD thankx for the tag btw...umwah!

1. wat's ur latest addiction?
* err...eatin yogurt XD

2. wat r u listnin to?
* music!! =D

3. how late did u stay up last nyt n y?
* errr..like 3 i guess...to watch some movies XD

4. who were u wit last friday nyt?
* with ma friendx =D

5. do u think u will b in a relationship 3 mnths frm nw?
* maybe...

6. wen is da next tym u'll see ur clz frnds?
* maybe tomorrow...

7. wat were u duin this mrnin at 7am?
* sleeping...XD

8. wat radio station do u listn to da most?
* hfm

9. wat was da reason u last cried?
* err..i cant remember...

10. hav u evr talk'd to sumone wen they were high?
* lol..yeah!

11. wat's da fifth text in ur inbox say?
* "PLEASE CALL 7*9*8*2 - From Dhiraagu "Call Me Back" Service"

12. Whr was da last cofy shop u go to?
* last week

13. wat's ur outfit ryt nw?
* black shirt and black shorts

16. wat were u duin at 11pm last nyt?
* on a call..;)

17. who was da last person u talked to last nyt b4 bed?
* LuLu babe! XD

18. will u b drivin in a year?
* yeah maybe...XD

19. is thr nethn tht u r craving ryt nw?
* yeah...

20. wen did ur last hug take place?
* on the road =D

22. hav u evr started a sentence wit "No offense, but..."?
* naah..

23. Do u drink tea?
* not usually...

24. hav u evr byn arrested?
* hehe..naah..!!

25. hav u rode in sum1 els's car 2day?
* nope

26. hav u made a mistake this past week?
* yeah...:(

27. who was da last person u texted?
* my classmate...

28. r u happy wit ur life ryt nw?
* naah..

29. in da past 72 hrs hav u byn undr da influence of slyp?
* hehe yeah...

30. wat's da connection between u n da last person u texted?
* friends... =)

time for me to tag!! XD rezorn and ne3...u've been tagged!! :P ..btw where did the question 14,15 & 21.. go :S

Userbars

Hey guys...check these new userbars i've made ;)


Maldivian - proud to be a Maldivian
Proud to be a Maldivian

Proud to be a Maldivian

Dhiraagu user
Dhiraagu user

Dhiraagu user

Wataniya user
Wataniya user

Wataniya user

ROL user
ROL user

ROL user

MvBlogs user
MvBlogs user

Raajje.tv user
Raaje.tv user

Reload gamer
Reload gamer

Reload gamer

RockStorm fan
RockStorm fan

Lecute RockStorm fan

Stygian Shores fan
Stygian Shores fan

Serenity Dies fan
Serenity Dies fan

Sacred Legacy fan
Sacred Legacy fan

Tormenta fan
Tormenta fan

FasyLive fan
FasyLive fan

EvilCommunity user
ECian

EC member

EC user

Euro fan
Euro fan


More userbars coming up... comments and requests are welcome ;)

No to terrorism!! Dont touch touch our Maldives!!

We don't want terrorists and terrorism in our Maldives!
Join the cyber-protest by Maldivian bloggers.
 
Copyright Info.

Copyright 2009 sykez
Powered by Blogger and BTemplates

Partners
Other Links
XHTML/CSS validations
Valid XHTML 1.0 Transitional Valid CSS!