Inhaltsverzeichnis

Setting up HLDS

Installation Grundserver

This is how you install Counter-Strike 1.5 mod, an HLDS server, without WON on a Linux server:

Now the naked server with the cstrike mod is installed and can be tested:

First Server Test

  1. cd hlds_l
  2. ./hlds_run -game cstrike -nomaster +sv_lan 1 +maxplayers XX +map de_dust
  3. 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

  1. Create the folder addons (i.e. cstrike/addons)
  2. Inside this folder create the folder metamod with the Metamod in it. Like this: cstrike/addons/metamod/dlls.
  3. Place the just obtained Metamod library file (metamod_i386.so) inside it.
  4. Then open the liblist.gam in cstrike 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).

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:

  1. Create a file named nowon.c with the following content: int NET_IsReservedAdr(){return 1;}.
  2. The file must now be compiled with the following commands: gcc -c nowon.c -o nowon.o
  3. Now the file is translated into object code and must be linked: ld -shared -o nowon.so nowon.o
  4. alternatively use the precompiled nowon.so
  5. 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 file hlds_run after the block with export: export LD_PRELOAD=<Path to Library>/nowon.so. If the file is in the root directory, corresponding to ./nowon.so as pathname.
  6. 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

  1. 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.
  2. Place *.amxx file in $moddir/addons/amxmodx/plugins ($moddir is the cstrike directory for CS)
  3. Open $moddir/addons/amxmodx/configs/plugins.ini
  4. Add a line with plugin_whatever.amxx, you can also add comments there if the plugin name is not meaningful anyway.
  5. Change map, or restart the server

Now you should be good. In case of problems (e.g. for the wrong amx version), check the #includes 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.

Plugin Suggestions

Sources

Back to CS 1.5