Table of Contents
Setting up HLDS
Installation Grundserver
This is how you install Counter-Strike 1.5 mod, an HLDS server, without WON on a Linux server:
- The best way is to create a new folder in which the server will be installed. This can be done with
mkdir hlds_l
(just type it on the console and press enter). - Change to the new directory with
cd hlds_l
Enter
. - It is now time to get all data on the machine with which the server will be installed. For this the following files are necessary:
- We start by making the Perl script nowon2.pl executable:
chmod +x nowon2.pl
- unzip
hlds_l_3110_full.tar.gz
- Unpack
cs_15_full.tar.gz
and move the unpacked foldercstrike
into the folderhlds_l
- Unpack
hlds_l_3111e_update.tar.gz
into thehlds_l
folder. Let the old files be overwritten (it is an update) - run
perl nowon2.pl hlds_l
- If you are working on a 64 bit version of Linux, you might need to install the 32 bit version of the libc6 package (e.g. for Debian that is libc6-i386).
- If there were no errors during patching, you are now finished with the installation.
Now the naked server with the cstrike mod is installed and can be tested:
First Server Test
cd hlds_l
./hlds_run -game cstrike -nomaster +sv_lan 1 +maxplayers XX +map de_dust
- The server should now start and accept connections on the default port 27015.
Installing Mods
Actually the basic server is not a CS server, but a Half-Life server, but with the appropriate mod it becomes one. Also the naked server is a bit boring. No server sounds, few administrative possibilities, there are no plugins to keep stats for example. But these mods require the installation of Metamod.
Metamod
The first thing you need is the Metamod. This can be found at http://www.metamod.org or https://sourceforge.net/projects/metamod/files/Metamod%20Binaries/. 1.18
- Create the folder
addons
(i.e.cstrike/addons
) - Inside this folder create the folder
metamod
with the Metamod in it. Like this:cstrike/addons/metamod/dlls
. - Place the just obtained Metamod library file (metamod_i386.so) inside it.
- Then open the
liblist.gam
incstrike
and delete the entry (or comment it out with;
): gamedll_linux "dlls/cs_i386.so" and write instead:gamedll_linux "addons/metamod/dlls/metamod.so"
and save.
That should run the Metamod. Start it briefly to test it. The CS server should already name it in a similar fashion as this:
Metamod version 1.18 Copyright (c) 2001-2005 Will Day <willday@metamod.org> Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type `meta gpl' for details.
AMXmodX
This is an actual mod, using MetaMod. You can get it here: https://sourceforge.net/projects/amxmodx/files/ or here: https://www.amxmodx.org/downloads.php. It comes in two parts, the base package and the additional package for the game mod you intend to use (in our case: cstrike).
- Unpack amxmodx-1.60-base.tar.gz to cstrike/addons/
- Unpack amxmodx-1.60-cstrike.tar.gz to cstrike/addons/.
- Add the following to cstrike/addons/metamod/plugins.ini:
linux addons/amxmodx/dlls/amxmodx_mm_i386.so
. Restart the server completely and the AMXmodX will run.
WAN Patch
The server installed in this way is a pure LAN server. This means that the server reacts to connections that do not come from an IP in the local network only with a message that it only allows LAN connections. This can be avoided by patching it. You can either patch it yourself, or use the prepared file.
Manually:
- Create a file named
nowon.c
with the following content:int NET_IsReservedAdr(){return 1;}
. - The file must now be compiled with the following commands:
gcc -c nowon.c -o nowon.o
- Now the file is translated into object code and must be linked:
ld -shared -o nowon.so nowon.o
- alternatively use the precompiled
nowon.so
- Now the file
nowon.so
has to be placed in the root directory of the server. Of course, it must also be called by the server. To do this, enter the following into the filehlds_run
after the block withexport
:export LD_PRELOAD=<Path to Library>/nowon.so
. If the file is in the root directory, corresponding to./nowon.so
as pathname. - The server should now be started with the command line parameter
+sv_lan 1
.
Switch off VAC
Valve Anti Cheat is certainly no longer up to date on CS 1.5 servers. Therefore you can disable it to prevent problems: enter secure 0
in the liblist.gam
.
Have the Server be Listed
Previously, servers created in this way were listed via the World Opponent Network, or “WON” for short, which in turn could be queried by CS clients from these servers. The WON servers were shut down by Valve in 2004, so the default addresses used by CS 1.5 no longer work. This gap has been closed by the no-won project, or Steamless project.
To make your server visible for the CS server search, replace the list in valve/valvecomm.lst
with another one. The new file is available at http://www.no-won.net/valvecomm.lst. Replace the old file (you might want to make a backup before, but it is not really useful).
Clients must do the same with the valve/woncomm.lst
file. After that the server is visible via the usual internal CS server search.
Installing Plugins
- Download
*.sma
file and*.amxx
file, the*.sma
files are the source codes, the*.amxx
are the compiled plugins. To use them you only need the*.amxx
. - Place
*.amxx
file in$moddir/addons/amxmodx/plugins
($moddir
is thecstrike
directory for CS) - Open
$moddir/addons/amxmodx/configs/plugins.ini
- Add a line with
plugin_whatever.amxx
, you can also add comments there if the plugin name is not meaningful anyway. - Change map, or restart the server
Now you should be good. In case of problems (e.g. for the wrong amx version), check the #include
s in the *.sma
-file. Maybe there is just something missing.
If #include <vexd_utilities>
is not available, replace with #include <engine>
It is possible that the code of from vexd_utilities
changed during the conversion to engine
(e.g.: EntVars_Get_Vector
became entity_get_vector
).
If none of this helps, ask for help in the forum.
For *.sma
files there is also a online compiler available, if no *.amxx
file was found.