NiftyHost Forums (Archive)
Create a fully working Counter Strike server with HLDS - Printable Version

+- NiftyHost Forums (Archive) (https://niftyhost.chary.us/support)
+-- Forum: Technology (https://niftyhost.chary.us/support/forum-7.html)
+--- Forum: Tutorials (https://niftyhost.chary.us/support/forum-10.html)
+--- Thread: Create a fully working Counter Strike server with HLDS (/thread-1184.html)



Create a fully working Counter Strike server with HLDS - Serial Thrilla - 05-30-2011

Create a fully working Counter Strike server with HLDS


Hello Counter Strike Players,

in this tutorial I will show you how to create a fully working internet server with the Half Life Dedicated Server Update Tool from Valve. Before we start I have to tell you some things. Its really easy when you know the basics of DOS but with this tutorial even total newbies can create a working internet server with whatever they want. I'm not only going to show you how to download and install it. I'll show you how to install some very important plugins that are needed for a very good Counter Strike internet server like Metamod, Amxmod and Dproto to support two types of protocols. We speak about protocol 47 (older) and protocol 48 (new). Lets start before you are getting boring from reading so much. Important that tutorial is only for windows users!!!

Tutorial:

1: Server installation
1. Download HLDSUPDATETOOL from Steam homepage.

2. Install this HLDSUPDATETOOL into a direction you can easily remember like C:\HLDS or C:\Program Files\HLDS.

3. After you have installed it open your command window (Press Windows + R and enter cmd).

4. Now enter cd and the direction where you installed HLDSUPDATETOOL and hit enter.

e.g: cd C:\HLDS

[Image: cmd.png]

5. Now we tell the tool to download Counter Strike server content. Enter hldsupdatetool.exe -command update -game cstrike -dir (here the direction you want for the server) and hit enter.

e.g: hldsupdatetool.exe -command update -game cstrike -dir C:\CS

[Image: cmd2l.png]

(It may take a little bit of your time untill it starts download so don't close the cmd window)

6. When the cmd promt says "HLDS up to date" you can close the cmd box because it finished downloading the server content.

[Image: cmd3.png]

2: Installation of Metamod and AMXMOD:
7. Download Metamod at Metamod homepage.

8. Lets install Metamod for now:
8.1. Create a folder called addons in C:\CS2\cstrike\ (should be changed to your path).
8.2. In this addons folder create a folder called metamod.
8.3. In this metamod folder create a folder called dlls and a file called plugins.ini with notepad.
8.4. Copy the metamod.dll into the dlls folder.
8.5. Open C:\CS2\cstrike (should be changed to your path) and find the file named liblist.gam.
8.6. Open this file with notepad and replace "gamedll "dlls\mp.dll"" with "gamedll "addons\metamod\dlls\metamod.dll"".
8.7. Open plugins.ini you created before and add win32 addons/amxmodx/dlls/amxmodx_mm.dll.

9. Now we lets install AMXMOD:
9.1. Download AMXMOD Full Installer from AMXMOD homepage.
9.2. Install the installer and run it and go on until you see a window where you can select the install methode:

[Image: amxf.png]

Select "Select mod directory" and click "NEXT".

9.3. Now the installer will ask you for the mod directory. Select the cstrike folder in C:\CS2\ (should be changed to your path).
9.4. Let the installer install the AMXMOD files and close the installer when its finished.
9.5. AMXMOD is also installed now.

3: Server configuration
10. Lets create a valuable and working server.cfg:
10.1. Find server.cfg in C:\CS2\cstrike\cfg (should be changed to your path) and open it with notepad.
10.2. Paste the into it:

Code:
// Use this file to configure your DEDICATED server.
// This config file is executed on server start.
// This is a comment

//GENERAL
// 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_lan 0

// sv_contact <email/web address> Contact email for server admin
sv_contact "[email protected]"

// 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
sv_region 0

//ROUND
// mp_buytime <seconds> - The amount of time to allow purchasing weapons/equipment on round start
mp_buytime 0.45

// mp_c4timer <seconds> - How long before the c4 explodes
mp_c4timer 45

// mp_timelimit <minutes> - How long each map should be played before switching levels
mp_timelimit 25

// mp_freezetime <seconds> - How long players are unable to move during round starts
mp_freezetime 5

//mp_roundtime <1-9> How much time in minutes does a round last. Default: 5
mp_roundtime 5

// mp_startmoney <money> - Specify how much money players start off with
mp_startmoney 800

//mp_friendlyfire <0/1> Turn on/off friendlyfire. Default: Off
mp_friendlyfire 0

//mp_footsteps <0/1> Turn on/off footsteps. Default: On
mp_footsteps 1

//mp_flashlight <0/1> Turn on/off the ability for clients to use flashlight. Default: Off
mp_flashlight 0

//mp_fraglimit <##> Amount of frags a player can exceed before changing maps. Default: 0
mp_fraglimit 0

//mp_maxrounds <##> Amount of round to play before server changes maps. Default: 0
mp_maxrounds 0

//mp_winlimit <0-20> Max number of rounds one team can win before server changes maps. Default: 0
mp_winlimit 0

// mp_spawnprotectiontime Time in seconds to Kick players who team-kill after round restart. Default: 5
mp_spawnprotectiontime 5

// mp_autoteambalance <0/1> Force clients to auto-join the opposite team if they are not balanced. Default: On
mp_autoteambalance 1

//mp_limitteams <0-20> Max # of players 1 team can have over another. Default: 2
mp_limitteams 2

//mp_autokick <0/1> Kick idle/team-killing players. Default Off
mp_autokick 0

//mp_tkpunish <0/1> Punish TK'ers on next round? Default: On
mp_tkpunish 1

//mp_hostagepenalty <##> How many hostages a Terrorist can kill before being kicked, 0 to disable. Default: 5
mp_hostagepenalty 5

// disable autoaim
sv_aim 0

// sv_cheats <0/1> - Whether to allow game cheat commands to be used by clients. 0 = off | 1 = on
sv_cheats 0

//VOICE-CHATTING
//sv_voiceenable <0/1> Allow clients to use mic. Default: 1
sv_voiceenable 1

//sv_alltalk <0/1> Players can hear all other players, no team restrictions. Default: Off
sv_alltalk 0

//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_voicecodec voice_speex

//sv_voicequality <1-5> the bps of the voice.
//1-2400bps
//2-6000bps-DEFAULT
//3-8000bps
//4-11200bps
//5-1520bps
sv_voicequality 2

//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
mp_chattime 10

//RATES-SPEEDS
//sv_gravity World Gravity Default: 800
sv_gravity 800

//sv_maxvelocity Maximum speed any ballistically moving object is allowed to attain per axis. Default: 3500
sv_maxvelocity 3500

//sv_maxspeed Maximum speed a player can move. Default: 320
sv_maxspeed 320

//CLEINT CVARS
//decalfrequency Amount of time in seconds a player can spray their decal. Default: 10
decalfrequency 10

//sv_consistency <0/1> Force cleints to pass consistency check for critical files before joining server? Default: 0
sv_consistency 0

//sv_timeout <##> After this many seconds without a message from a client, the client is dropped. Default: 65
sv_timeout 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
mp_playerid 0

// sv_pausable <0/1> - Whether to allow clients to pause the server. 0 = off | 1 = on
sv_pausable 0

//sv_allowupload <0/1> Allow clients to upload their custom decals to the server. Default: 1
sv_allowupload 1

//sv_allowdownload <0/1> Allow clients to downnload files. Default: 1
sv_allowdownload 1

//sv_unlag <0/1> Enables player lag compensation. Default: 1
sv_unlag 1

//SPECTATING
//mp_allowspectators <0/1> Allow spectators on the server. Default: 1
mp_allowspectators 1

//mp_forcecamera <0/1> Force dead players to first person mode, effectively disabling freelook. Default: Off
mp_forcecamera 0

//sv_hltv <0/1> Enables HLTV on the server. Default: 0
sv_hltv 0

//BANDWIDTH RATES
//sv_minrate <0-25000> Min bandwidth rate allowed on server. Default: 0 (unlimited)
sv_minrate 0

// sv_maxrate <1000-25000> - The maximum bandwidth rate the server is allowed to transmit to clients
sv_maxrate 10000

//sv_maxupdaterate Maximum updates per second that the server will allow. Default: 60
sv_maxupdaterate 60

//sv_minupdaterate Minimum updates per second that the server will allow. Default: 10
sv_minupdaterate 10

//sys_ticrate Max FPS (1000 Max) the server is to render
sys_ticrate 200

//SERVER LOGGING
// log <on/off> Enable server logging? Default: Off
log off

//sv_logbans <0/1> Log server bans in the server logs. Default: 0
sv_logbans 0

// sv_logecho <0/1> Echo log information to the console. Default: 1
sv_logecho 1

// sv_logfile <0/1> Log server information in the log file. Default: 1
sv_logfile 1

//sv_log_onefile <0/1> Log server information to only one file. Default: 0
sv_log_onefile 0

//sv_logsdir Folder in the game directory where server logs will be stored.

//RECON
//rcon_password Set rcon passsword. Leave blank to disable rcon
rcon_password ""

//sv_rcon_banpenalty <mins> Number of minutes to ban users who fail rcon authentication. Default: 0
sv_rcon_banpenalty 0

//sv_rcon_maxfailures <0-20> Max number of times a user can fail rcon authentication before being banned. Default: 10
sv_rcon_maxfailures 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_minfailures 5

//sv_rcon_minfailuretime <1-seconds> Number of seconds to track failed rcon authentications. Default: 30
sv_rcon_minfailuretime 30

// lists of banned players.
// load ban files
exec listip.cfg
exec banned.cfg

10.3. Edit the details like server name and other things and save server.cfg and close notepad.

4: Starting the server
11. Now create a shortcut on the desktop to the hlds.exe in C:\CS2\ (should be changed to your path).

12. Edit the shortcut and add this parameters to the target field: -console -game cstrike -ip (get your IP over http://www.ip-adress.com) -port 27015 +maxplayers (1-32) +map (only maps you have in maps in cstrike).

e.g: -console -game cstrike -ip 240.5.59.5 -port 27015 +maxplayers 32 +map de_dust2

13. Start the server from this shortcut.