PDA

View Full Version : How to host a CSS Server


Timmeh
15-05-2005, 01:44 PM
Recently, I've had a whole lot of people asking me how to set up a dedicated CS Source server for their friends to play games on. I know there's a "guide" in the readme, but it's vague and doesn't explain how to fully set up the server after installation, so I thought this thread'd be a good idea :).

Installing the server

The first thing you're going to need to do is to download either:

http://www.steampowered.com/download/hldsupdatetool.exe (Windows)

or

http://www.steampowered.com/download/hldsupdatetool.bin (Linux/Unix)

and install it somewhere. For the purpose of this guide, lets imagine we're extracting it to C:\Temp\CSServer

Next, open a command prompt window (For windows XP this'll be Start > Run > cmd), open whatever's appropriate for your OS.

Change the path of the prompt to the location of the server, so in this case

CD C:\Temp\CSServer

Next you're going to execute the update program but with special parameters.

-command update (tells the server to update)

-game (what game do you want the server to run)

This can be:

"cstrike" - counter-strike 1.6

"dmc" - Death match classic

"dod" - Day of defeat

"ricochet" - Ricochet (that one took a genius)

"tfc" - Team Fortress classic

"valve" - HLDM

"Counter-Strike Source" - I think this one's pretty much explains itself too... although you can select this for HL CTF etc.

"hl2mp" - Half Life 2

-dir (path to install to)

Your command prompt should now say something like

C:\Temp\CSServer

After this you'll need to add on:

HldsUpdateTool.exe -command update - game (see above) - dir (wherever you want to install the server on your computer)

//Something like:

HldsUpdateTool.exe -command update - game "Counter-Strike Source" -dir "C:\CSS Server"


hit return... and you should see your server start to update itself. Leave it until it tells you it's completed (around 800mb to download for most games).

Your server is now all set up :) however, for certain games, you may want to change certain things before you start playing!


Configuring the server

I'm going to give instructions on how to fully customise a counter-strike source server, although the process is extremely similar for every game.

Open the directory you installed the server into and open the "cstrike" folder.

No doubt you've found some cool maps in the time you've been playing CSS, so add them to your server! They'll be in your steam folder, or can be downloaded from www.csbanana.nu . Place the bsp and nav files into [root]\cstrike\maps. Go into [root]\cstrike\ and you'll find a file called "maplist.txt". Add the name of the map to this list.

Imagine you added "aim_map_usp.bsp" and "aim_map_usp.nav" to the maps folder. You'll now need to add "aim_map_usp" to maplist.txt. These maps will now be available to play on on your server.

Next, arrange what order the maps are played on your server. Open mapcycle.txt in the cstrike folder. This list shows what order maps are played in. You can move them round, add maps, delete maps etc. Do not delete test_hardware and test_speakers at the bottom of the list though... you need them :p

Following the above example, say you want aim_map_usp.bsp to be the first map you play when you start the server, insert "aim_map_usp" without the ""'s at the top of the list. Save.

Your server is now ready to play on, however, I’d strongly suggest installing the mani admin mod (http://www.mani-admin-plugin.com/forums/portal.php).


Mani admin mod

Download the mod from the above website and point the installer to the root of the server. When you open the directory your server's in, you should now have some more folders and files. You can set up admins here. Open [Root]\cfg\mani_admin_plugin\adminlist.txt - here you can set up your admins. It's very self explanatory, you can either add a SteamID or IP address to grant admin. Add yourself first, to find out your SteamID, join a CSS server and type "status" in console, which'll give you something like STEAM_0:0:4325344. Add this on a new line of adminlist.txt without // before it. You can then add any friends you wish to grant admin access to by finding out their SteamIDs and adding them to the list. Save the file when you're done.

Router setup

HLDS uses a number of ports. If you have a router, you'll need the following open for the server to work:

27010 UDP
27011 UDP
27012 UDP
5273 TCP
7002 TCP
27020 TCP and UDP
27016 UDP

The server will then run on port 27016.

You're ready to launch the server! Launch srcds.exe don’t forget to set an rcon password and change the port number to 27016, then you can set up your server in the game. Tell all your friends to connect to your IP:27016. You can mix network and internet play, for example, 4 of your friends at a LAN party at your house can play with another 2 who couldn’t make it. I did this for a LAN party over Easter, around 14 people came to a LAN, but a few of my friends couldn't come for various reasons and joined in over the net.

I'll edit this with any extra ideas, comments, tutorials, just post ideas below.

Enjoy!

Twatybollocks
16-05-2005, 08:38 AM
Superb stuff! I'd give you a plus but I need to spread some more love before I plus you again.

This may come in handy. The guy running our clan server has had enough and we will be without a server from the 27th of this month. I'm thinking of renting one from games2sx.com so I don't know how much of the above I'll need to do but I'll print it out and keep it safe under my pillow....or something!

Lewiji
16-05-2005, 02:23 PM
Here's my guide on using the Eventscripts plugin for CS:S

EventScripts: A sourcecommand recognition plugin

What does eventscripts do?

Basically, whenever something happens within the source server, eg a bullet hitting someone, the bomb being planted, defused, touching a hostage, an event is triggered in the server to ensure everyone gets the same data.

Eventscripts is an easy way to manipulate these commands. When the map changes, it searches the cfg directory for any cfg files related to the commands that source uses. Then when this event is triggered, it executes the cfg file.

http://www.sourcemod.net/forums/viewtopic.php?t=908

Here is the eventscripts plugin. Download it, have a read through the documentation. To install it, simply place the .dll (Windows) or .so/.vdf file (Unix/Linux) in the "addons" folder (the same folder the main mani plugin goes).

So, how do I find out the commands?

The events aren't allowed to be distributed for some reason, copyright or whatever. However you can find out yourself easily.

http://countermap.counter-strike.net/Nemesis/

GCFScape is a program that lets you browse and extract the resources from the Game Cache File. In this case, you want to have a look through a few files:

counter-strike source shared
counter-strike source client

And various other gcf files. These are found in C:\program files\valve\steam\steamapps. Open them up in Scape and look through the tree-you'll find various commands, events and triggers.

So, you find an event called "bomb_planted". You want to, I don't know, play a sound through mani admin plugin. You'd create a file called "bomb_planted.cfg" and inside, type:

ma_play countdown

Where countdown is the name of the sound in mani :p

I haven't got access to gcfscape now, but you'll notice when browsing events that they also have variables, such as xposition, userid, etc. So you could in theory slap the person who plants the bomb:

bomb_planted.cfg
ma_slap event_var(userid)

Now this is very simple, but the plugin supports many commands, including if statements, custom commands such as displaying coloured messages, generating random numbers, sending a message to a particular user, etc.

Adding new sounds to Mani Admin Plugin - THIS IS OBSELETE FOR THE NEW VERSION

Adding sounds can be a lengthy process. I'm writing a program to update res files for you, but you'll read about that later.

The process is fairly easy:

1. Find a sound
2. Upload to the /sound folder, perferably in a subfolder to keep things tidy (my sounds go in the admin_plugin dir)
3. Add the sound to the soundlist.txt located in /cfg/mani folder. The syntax is easy, you can work it out from the rest of them.
4. This is the long bit. HLDS won't download new sounds automatically: It has to be told when a map changes which files are required. These are called resources and are located in the map dir.

Res files are fairly simple. Let's say we want a sound called "feckorf.mp3". You can define files to download like this:

"resources"
{
"sounds/admin_plugin/feckorf.mp3" "file"
}

You then name it (mapname).res and put it in /maps

The reason this is like it is is so that custom maps can, for example, download custom materials needed for that map.

This is why it takes so long: For every map, you need the res file, or the sound won't be downloaded. I'm making a program that you can feed maplist.txt plus the resources, and it creates the res file ready to be uploaded.

Twatybollocks
27-05-2005, 08:58 AM
All good stuff and is heklping me to configure my server. Just a few questions.

If I wanted to create a welcome screen for anyone connecting to the server, how would I do that?

I have the Mani-Admin plugin with all the defaults set but what would I need to do to add/configure new commands to the menu?

Where do I download that Countdown sound? :p

Lewiji
27-05-2005, 01:20 PM
1) The welcome screen before you click OK to join a game is located in cstrike/motd.txt. You can use HTML

2) Each individual menu has a text file assigned to it. I usually use the rcon menu to add new commands, this is in cstrike/cfg/mani_admin/rconlist.txt

I believe the format is

"Name of command" command

IE

"Add a bot" bot_add

3) No idea, I'm trying to re-find it myself as I messed up the last one :p But you can use my previous one which is awkward (you have to have bomb timer @ 29.5 and it's too loud), it'll be in C:\program files\valve\steam\steamapps\user@name.com\counter-strike source\cstrike\sounds\mani_admin\countwoo.wav I believe.

Twatybollocks
27-05-2005, 02:42 PM
Cheers Lewiji. I wonder if there's a way to edit the countdown file to last a bit longer so it fits standard matches??

jimeh
27-05-2005, 03:03 PM
You could just add an extra few seconds at the start to it- for the A-Team theme tune I used on my old server I used my pc microphone to record it, which came out pretty high quality.

Timmeh
27-05-2005, 03:10 PM
Cheers Lewiji. I wonder if there's a way to edit the countdown file to last a bit longer so it fits standard matches??

Sadly you're not allowed to use such things in matches, standard rules are a set config but be used and all server mods turned off :(

jimeh
27-05-2005, 03:26 PM
You could also exec a config to turn it off before a match. Eh? Eh?
Although no one ever complained about us having our startup sound, besides it can't be turned off very easily if its embedded in the motd.

Lewiji
27-05-2005, 03:36 PM
Yeah, on my RCON menu I have a "start clan match" script which turns off eventscripts, enables war mode, passwords and sets the hostname amongst various other things.

Twatybollocks
28-05-2005, 10:31 AM
Tis all new and shiny and bright!!

Still playing with the server. I have teamspeak installed and connected to the server but I was wondering exactly how you use it to talk to other clan members during games? Does it replace the teamspeak functionality in CS:S or do you press a button to activate it and then one to stop??

Timmeh
28-05-2005, 10:45 AM
Teamspeak's a completely independant program... you can use it in or out of game. The best thing to do is bind a key to talk... if you click (on the teamspeak client) settings > input/output settings then bind a key to talk (I use middle mouse button), you can press that button in game to talk to everyone else on teamspeak :)

Dashers
13-09-2005, 11:42 PM
Yo, biggus bumpus. Im trying to set up a server so me and a few friends can have a bot slaughter session, ive managed to get on it,but he hasnt, he cant seem to find it. im thinking might be something to do with ports, but im being a total retard and have forgotten how to modify them. any help?
Thanks

Timmeh
13-09-2005, 11:44 PM
Do you have a router/firewall?

Dashers
13-09-2005, 11:45 PM
woo,rapido response!
Yeah,just turned that off too see if makes difference, will hopefully know in a bit

Timmeh
13-09-2005, 11:46 PM
Yeah, you'll need to turn off/allow HLDS as well as opening the ports I mentioned in my first post on your router

27010 UDP
27011 UDP
27012 UDP
5273 TCP
7002 TCP
27020 TCP and UDP
27016 UDP

Dashers
13-09-2005, 11:51 PM
Well all firewalls are off,but he still find the server. I am confused.com. Its 172.16.1.34:27015 if anyone acctually wants to try:p

Timmeh
13-09-2005, 11:52 PM
Fraid nothing :P

Dashers
13-09-2005, 11:54 PM
Yeh, im recknoning im not gonna be able to do it. oh well, could still have a 2 person lan party with ppl in different rooms. Wooo *dies*

Edit:Thanks for help anyway!

Ryder
25-04-2006, 03:32 PM
How do I change the path of my prompt?

Lewiji
26-04-2006, 03:58 PM
How do I change the path of my prompt?
Whut?

Ryder
26-04-2006, 04:56 PM
I am a n00b at this stuff so I need help...

Lewiji
26-04-2006, 05:14 PM
Yes but no one has any idea what the question means.

Ryder
26-04-2006, 06:21 PM
Change the path of the prompt to the location of the server, so in this case

Says it all...

Timmeh
26-04-2006, 06:24 PM
Correct, it does.


CD C:\Temp\CSServer

Ryder
26-04-2006, 06:31 PM
It dont work for me then :S.

Timmeh
26-04-2006, 06:43 PM
Just type

CD directory of CS server

like

CD C:\I%20installed%20my%20CS%server%20here

or

CD C:\Fred

or anywhere else you may have installed it to.

Ryder
26-04-2006, 07:05 PM
I will just leave it, it is too comlicated for me :nana: .

God.
16-12-2006, 07:43 PM
lol go timmeh :)

andros
28-09-2008, 06:54 AM
Although no one ever complained about us having our startup sound, besides it can't be turned off very easily if its embedded in the motd.



btw... how in the name of god do i make a sound to be played when somebody joins to my server? (counter strike source)... that startup sound...
i've searched the net like crazy and i didnt found any answer... all the links related to this subject are erased... lol
so guys pls help me... i need to configure my server to do that