3/21/2020 Host Cracked Cod4 Servers
Before you start with this tutorial, I assume know how to forward ports in your router. If not, look it up first as that is not the scope of this tutorial. You require the port 28960 on UDP to be forwarded.
![]()
Now you've started your very first own Cod4X server, you of course want to configure it.In README.md you should've noticed you could pass arguments to the binary using
+set value_name value . Although this works, this is of course not do-able if you're going to use more options. For this you can create configuration files which are called by the server upon launch.
Host FREE servers for CoD4 1.7/1.8, CoD2 1.3, CS1.6, CSGO, Battalion1944, Insurgency Sandstorm, MOHAA, and TF2. Get your very own free game server with RCON. We have a number of configurations including cracked servers.
The location of this config file depends on if you're going to run mods or not. If you're going to run a server without mods place the config file in
serverlocation/main . If your server is going to run mods, place it in serverlocation/mods/modname instead.
We will call the config file
server.cfg for now, but this can be anything you want.Although most variables can be configured in the configuration file, not every variable can.
You will need to specify the following in the startup command:
![]()
The config file should include the following minimum content (note that
set is not required here):
Cod4 also has the possibility to load other config files from the current config file.To do this add
exec configfilename.cfg somewhere in your config file. I would recommend adding them all either on top or on the bottom to keep your config readable.
Extra variables by Cod4X
Cod4X adds a few extra variables for more control over your server:
Map and gamemode rotation
After the main part of the server is setup, we require to add a so-called 'map rotation'. This variable just tells the server what maps to run and with what gamemodes. I would recommend putting this in a seperate config file as it may become very long.
The variable is called
sv_mapRotation and follows a specific format. First you require to tell the server what gametype to run, for example gametype dm (deathmatch, also known as free-for-all).You can use the following gametypes:
Some mods add extra gamemodes. Note that custom maps may not support all gamemodes listed here.
After specifying the gamemode your server is going to be running, you have to tell the server what maps it should rotate through. This is done using
map mp_mapname . For example map mp_killhouse . Place it after the gametype, so gametype dm map mp_killhouse . If you want more maps just add map mp_mapname after what you already have.
You can rotate through multiple gamemodes and maps by first specifying the gamemode, and then the maps that should be run with that gamemode. For any extra gamemodes you just add them to the list. An example would be:
This tells the server to run the gamemode free-for-all with the maps mp_backlot, mp_block and mp_broadcast, the gamemode search and destroy with the maps mp_shipment, mp_countdown, and the gamemode domination with the maps mp_backlot and mp_shipment.
Plugins
Cod4X (note, not the base game Cod4) allows the use of server-side plugins. TODO link to 'writing a plugin' tutorial.
After downloading or compiling a plugin, place the files in
serverdirectory/plugins . For Windows servers you will need .dll files, for Linux .so files.
You can load individual plugins by using
loadplugin pluginname in the console (either rcon or on the live server output). The pluginname is the name of the plugin file without the file extension. Of course you can also specify this in a config file upon server startup (which is recommended) by just adding the command.
Mods
Cod4 also has support for mods. These are written by mod developers in a script language called Codscript. You can only use one of them at the same time.
![]()
Place your mods and server config file in
serverdirectory/mods so you end up with the following file structure:
Load them by adding
set fs_game mods/modname to the server launch parameters.
Note: the server config file should be in the mod directory, instead of in serverdirectory/main . This is because this way you can use different config files per mod.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |