Wednesday, June 14, 2006

Hosting HLDS (Counter-Strike) Tutorial

This is a simple tutorial on how to host Dedicated Server for Counter-Strike 1.6 using HLDS.

Many of my friends ask me how to host a CS 1.6 Sever to play online, this Tutorial explains a simple way to set up a CS 1.6 Dedicated Server using Half-Life Dedicated Server (HLDS). Click on images to get a bigger view.

  • Step 1

    Install CS 1.6 apply the Lastest non steam patch

  • Step 2

    Double Click hlds.exe as shown in the figure


  • Step 3

    The following Screen pops up


    Choose the Following Settings

    Game Type : Counter-Strike
    Server Name : As u like it
    Map : Choose ur Map
    Network : Internet (for Steam Servers) & LAN (Remember it MUST be LAN even if ur playing the Internet DO NOT CHOOSE INTERNET or it will NOT work for non-steam servers)
    Max Players : As u wish
    UDP Port : Leave it Default
    RCON Password : Enter anything u like (Its used in controlling the server remotely)
    Anti-Cheat : Enable if u will (Works only on Steam Servers)

  • Step 4

    Click start wait a few minutes and The Resultant Server should look like this


    It shows the IP address, server type, maps cycle, max number of players, game type etc.
    You can change these from here.

  • Step 5

    In the below image


    The config tab is shown the Default Time Limit is set to 20 min the rest is quite self-explanatory. You can change most of the commonly used server settings from here.

  • Step 6

    The Players tab shows who all connected to ur server, u can kick / ban players from there server here

    Now for u to join the server just start CS 1.6 AFTER hosting (Remember always AFTER hosting) and then connect to the server by takin the console using '~' tilde and type the following in the console

    connect ip

    where ip is the "ip address" shown in the "Main Tab"

    Remember if you have 2 LAN cards on the system or use service like BSNL DataOne there is a chance that the IP Address shown in the screen may not correspond to the IP that connects you to the net. Instead it might be the address of your LAN. In this case do the following. Take Command Prompt and enter the command "ipconfig". It will show all the possible IP addresses avialable from there choose the correct IP and give to your friends.

    Also You can join your own server from your computer using the same technique. The only thing to be noted is that you musn't be running Counter-Strike 1.6 prior to hosting a dedicated server.

    If you get a "valve server validation rejected" error this implies that your "swds.dll" is not set to accept non-steam clients. You can download a copy from here . Replace the orginal swds.dll with the downloaded one. swds.dll is usually loacted in the same directory as hlds.exe refer the 1st picture.
    (Remember you must own a legal steam version of Counter-Strike 1.6 before you can use the above swds.dll and should only use it for purposes like LAN Parties and for non profit purposes only.)


  • The Console


    Remember in Dedicated server ur in Game console does not work for commands like "sv_restart 1" etc. You hav to use the server console instead. The server console is shown in the above image.

    The console is also the place where you can change advanced settings for gameplay. You can also execute configuration scripts to set server to a preconfigured state and display messages.

    As for the number of players in Server a typical 64k connection can take 4 people with minimal packet loss, while 256 k is much better in takin 2 on 2, however a 512 k connection can take up a 4 on 4 match without much lag or loss. It also dependes on the upload speed for the connections. If the upload speed is capped to 64 kbps in a 512 kbps connection its equivalent to running a 6k kbps server as you will experience loss / choke. This is a typical problem with ADSL connections. Where download / upload speeds differ.

    Hope that this tutorial was helpful to those who wanted to know about hosting a dedicated server. Please do feel to leave comments on how to improve the quality of server or this tutorial.

    Previously Posted on TvmLife

1 comment:

Anonymous said...

dude!! :) much much much thanks for this.. :)