Call Of Duty 4

From MonsterLANWiki

Jump to: navigation, search

Contents

Server Scripts

The following are the scripts & config files used to run the Call of Duty 4 Servers on Windows XP for MonsterLAN.

Start Script

This is the windows server start script for Call of Duty 4. This is file is called MLServer.bat and must be put in the server directory ("\mlservers\Call of Duty 4\main\MLComp_TDM").


@echo off

rem // variable 1 is the server number. //
rem // variable 2 is the round number. //
rem // Using 0 for both will trigger the public server. //

:servercheck
rem // which server should we start? //
IF %1 == 1 GOTO portcheckA
IF %1 == 2 GOTO portcheckB
IF %1 == 3 GOTO portcheckA
IF %1 == 4 GOTO portcheckB
IF %1 == 5 GOTO portcheckA
IF %1 == 6 GOTO portcheckB
IF %1 == 7 GOTO portcheckA
IF %1 == 8 GOTO portcheckB
IF %1 == 0 GOTO portcheckA
GOTO else

:portcheckA
set serverport=28961
GOTO roundcheck

:portcheckB
set serverport=28962
GOTO roundcheck

:roundcheck
rem // which round should we start? //
IF %2 == 1 GOTO match
IF %2 == 2 GOTO match
IF %2 == 3 GOTO match
IF %2 == 4 GOTO match
IF %2 == 5 GOTO match
IF %2 == 6 GOTO match
GOTO else

:match
echo ::: STARTING SERVER %1 - ROUND %2 :::
cd ..
cd ..
start "Server %1" /high iw3mp.exe +set fs_game "mods/DAMN" +set dedicated 1 +set sv_punkbuster 0 +exec MLComp_TDM\Match_map%2.cfg +map_rotate +set net_port %serverport% +set sv_hostname "^1ML ^3Tournament Server %1" +set scr_motd "^1MonsterLAN ^3Tournament Server %1" +exec MLComp_TDM\loadsettings-match.cfg
cd main
cd MLComp_TDM
GOTO end



:else
echo ::: STARTING PUBLIC SERVER :::
cd ..
cd ..
start "Public Server" /high iw3mp.exe +set fs_game "mods/DAMN" +set dedicated 1 +set sv_punkbuster 0 +exec MLComp_TDM\Public_maps.cfg +map_rotate +set net_port %serverport% +set sv_hostname "^1ML ^3Public Server" +set scr_motd "Welcome to ^1MonsterLAN ^3Public Server" +exec MLComp_TDM\loadsettings-public.cfg
cd main
cd MLComp_TDM




:end
echo ::: BATCH FILE COMPLETE :::


DAMN Mod - Server Administration Mod

MonsterLAN uses the DAMN Mod to administer the servers & run the tournaments. The DAMN Mod adds a lot more features & customisations that the base Call of Duty 4 server doesn't have. Some of the useful features are:

  • Ready Up Mode
  • Remove fixed MG guns from maps
  • Perks/Weapons/Class restrictions
  • Auto Halftime change over
  • And many more features

DAMN Mod Installation

Note: At time of writing the DAMN Mod version was 0.41

Step 1: Unpacking the Mod

   * Extract the contents of the DAMNv0.31.rar file to its own folder
   * The DAMN folder should contain the following file(s):
     z_svr_modwarfare.iwd
     default_server.cfg
     mod.ff
     mod.csv
   * The PB folder should contain the following file(s):
     pbsv.cfg
   * The following file(s) should also be in the .rar file:
     server.cfg
     readme.txt
   * Modify the server config included in the folder to your own server settings (password, rcon, etc.)
   * The included pbsv.cfg is the PunkBuster config for the CEVO Tournament. If you wish to use it, replace your current pbsv.cfg with the one included

Step 2: Setting up files

   * Move the DAMN folder into your servers /mods folder
   * If you wish to use the server config included, move the server.cfg (that you modded with your information) to your /main folder
   * If you wish to use the PunkBuster config included, move the pbsv.cfg to your /pb folder

Step 3: Setting up the server

   * Add the following to your servers command line: +set fs_game "mods/DAMN"
   * If you do not have access to your servers command line please contact your server provider and ask them to do it for you.

Configs

MonsterLAN uses the DAMN Mod to administer the server configs. The configs are created and put inside the DAMN Mod file ("\mlservers\Call of Duty 4\Mods\DAMN\z_svr_modwarfare.iwd")

Creating Configs

Once you have installed the DAMN Mod you need to edit the mod files.


  1. Open the file "\mlservers\Call of Duty 4\Mods\DAMN\z_svr_modwarfare.iwd" with winrar.
  2. Browse to the "\DAMN" in the file
  3. Edit the rules.gsc file with notepad
  4. Add the following line to the bottom of the RULESET list:
    [[ registerRuleSet ]]( "ml", "MonsterLAN", damn\rules\ml::methods );
  5. Save & close the rules.gsc file
  6. Browse to the "\damn\rules" directory in the file
  7. Copy the config file ml.gsc (see: Configs)
  8. Put the ml.gsc file into the "\damn\rules" directory and close the file.

Public & Match Server Config

Note: I need to write a blurb about what each section does. Global variables and mode veriables (eg: match & pub)

// MonsterLAN Ruleset (www.monsterlan.com)

// Original Code done by DAN in DAMNv0.3
// Refactored by Steve at multiplay.co.uk

// Dynamic loading version of Damn Ruleset
// Conversion sponsored by: Multiplay
// Conversion done by: killing@multiplay.co.uk

// Methods supported types by this ruleset
// WARNING: This must agree with the methods by the current version of damn
methods()
{
	funcs["modeName"] = ::modeName;
	funcs["setRules"] = ::setRules;

	return funcs;
}

// Types supported types by this ruleset
modeName( type )
{
	names = [];
	switch( type )
	{
	case "pub":
		names[0] = "^1ML ^3PUB";
		names[1] = "^1ML ^3PUB";
		break;

	case "scrim":
		names[0] = "^1ML ^3SCRIM";
		names[1] = "^1ML ^3Scrim";
		break;

	case "overtime":
		names[0] = "^1ML ^3OT";
		names[1] = "^1ML ^3OT";
		break;

	case "default":
		names[0] = "^1ML ^3MATCH";
		names[1] = "^1ML ^3Match";
		break;
	}

	setModifiers();

	return names;
}

setRules( type )
{
	// GAMEPLAY AND SERVER SPECIFIC
	setDvar("rcon_password", "monster");
	setDvar("_Admin", "CherryPopper");
	setDvar("_Email", "cherrypopper@monsterlan.com");
	setDvar("_Website", "www.monsterlan.com");
	setDvar("_Location", "Geelong");
	setDvar("_Irc", "#monsterlan irc.austnet.org");
	setDvar("_mod", "modwarfare");

	setDvar("scr_oldschool", 0);
	setDvar("scr_hardcore", 0);
	setDvar("scr_game_spectatetype", 1);
	setDvar("scr_game_allowkillcam", 0);
	setDvar("scr_game_perks", 1);
	setDvar("scr_game_onlyheashots", 0);
	setDvar("scr_game_forceuav", 0);
	setDvar("scr_game_hardpoints", 0);
	setDvar("scr_hardpoint_allowartillery", 0);
	setDvar("scr_hardpoint_allowuav", 0);
	setDvar("scr_hardpoint_allowhelicopter", 0);
	setDvar("scr_team_teamkillspawndelay", 0);
	setDvar("scr_team_kickteamkillers", 0);
	setDvar("scr_enable_hiticon", 1);
	setDvar("scr_enable_music", 0);
	setDvar("scr_enable_nightvision", 1);
	setDvar("sv_fps", 30);
	setDvar("sv_maxRate", 25000);
	setDvar("sv_pure", 1);
	setDvar("sv_cheats", 0);
	setDvar("sv_voice", 1);
	setDvar("sv_voiceQuality", 0);
	setDvar("voice_localEcho", 0);
	setDvar("winvoice_mic_mute", 1);
	setDvar("sv_allowAnonymous", 0);
	setDvar("g_antilag", 0);
	setDvar("g_compassShowEnemies", 0);
	setDvar("ui_allow_classchange", 1);
	setDvar("dam_disable_mgs", 1);

	 // GAMETYPE SPECIFIC
	// Search & Destroy
	setDvar("scr_sd_scorelimit", 13);
	setDvar("scr_sd_roundlimit", 24);
	setDvar("scr_sd_timelimit", 2 );
	setDvar("scr_sd_roundswitch", 12);
	setDvar("scr_sd_bombtimer", 45);
	setDvar("scr_sd_planttime", 4);
	setDvar("scr_sd_defusetime", 7);
	setDvar("scr_sd_multibomb", 1);
	setDvar("scr_player_maxhealth", 100);
	setDvar("bg_falldamagemaxheight", 350);
	setDvar("bg_falldamageminheight", 200);

	// Teamdeath Match 
	setdvar("scr_war_scorelimit", 750); 
	setdvar("scr_war_timelimit", 20); 
	setdvar("scr_war_roundlimit", 1); 
	setdvar("scr_war_numlives", 0); 
	setdvar("scr_war_playerrespawndelay", 0); 
	setdvar("scr_war_waverespawndelay", 0);

	setDvar("dam_strattime", 10);
	setDvar("dam_lefticons", 2);
	setDvar("dam_killquickmessage" , 0);
	setDvar("dam_hiticons" , 1);
	setDvar("dam_radarplantfix" , 1);

	// DAMN CVARS
	setDvar("dam_strattime", 10);
	setDvar("dam_lefticons", 2);
	setDvar("scr_player_sprinttime", 4);
	setDvar("dam_killquickmessage" , 0); 
	setDvar("dam_hiticons" , 4);
	setDvar("dam_radarplantfix" , 1);
	setDvar("dam_disable_briefcase" , 1);
	setDvar("dam_disable_mgs" , 1);

   // REGEN SYSTEM AND HEALTHBAR
   setDvar("dam_regen_system" , 0);
   setDvar("dam_healthbar" , 0);
   setDvar("dam_healthbar_num" , 0);

   // Destructibles
   setDvar("dam_disable_destructables" , 0);

   // SIDE SWITCHING
   setDvar("dam_switchsides" , 0);

	// DAMN CVARS
	switch ( type )
	{
	case "default":
		// MATCH SETTINGS
		setDvar("dam_enable_readyup", 1);
		setDvar("dam_enable_strattime", 1);
		setDvar("dam_auto_ot" , 0);
		setDvar("dam_playout" , 0);
		setDvar("scr_team_fftype", 1);
		setDvar("scr_teambalance", 0);
		setDvar("g_allowvote", 0);
		setDvar("voice_global", 0);
		setDvar("voice_deadChat", 0);
		setDvar("sv_maxclients", 12); 
		break;
	case "pub":
		setDvar("dam_enable_readyup", 0);
		setDvar("dam_enable_strattime", 1);
		setDvar("dam_auto_ot" , 0);
		setDvar("dam_playout" , 1);
		setDvar("scr_team_fftype", 0);
		setDvar("scr_teambalance", 1);
		setDvar("g_allowvote", 1);
		setDvar("voice_global", 1);
		setDvar("voice_deadChat", 1);
		setDvar("sv_maxclients", 24);
		break;
	case "scrim":
		setDvar("dam_enable_readyup", 1);
		setDvar("dam_enable_strattime", 1);
		setDvar("dam_auto_ot" , 0);
		setDvar("dam_playout" , 1);
		setDvar("dam_killquickmessage" , 1);
		setDvar("scr_team_fftype", 1);
		setDvar("g_allowvote", 0);
		setDvar("voice_global", 0);
		setDvar("voice_deadChat", 0);
		setDvar("sv_maxclients", 12);
		break;
	case "overtime":
		setDvar("dam_enable_readyup", 1);
		setDvar("dam_enable_strattime", 1);
		setDvar("dam_auto_ot" , 1);
		setDvar("dam_playout" , 0);
		setDvar("scr_team_fftype", 1);
		setDvar("g_allowvote", 0);
		setDvar("voice_global", 0);
		setDvar("voice_deadChat", 0);
		setDvar("sv_maxclients", 12);

		//  OT SETTINGS
		setDvar("scr_sd_scorelimit", 4);
		setDvar("scr_sd_roundlimit", 6);
		setDvar("scr_sd_roundswitch", 3);
		break;
	default:
		logString( "Invalid mode type: " + type );
		break;
	}

	// WEAPONS ADDONS AND PERKS
	setDvar("perk_allow_specialty_parabolic", 0);
	setDvar("perk_allow_specialty_gpsjammer", 0);
	setDvar("perk_allow_specialty_holdbreath", 1);
	setDvar("perk_allow_specialty_quieter", 0);
	setDvar("perk_allow_specialty_longersprint", 1);
	setDvar("perk_allow_specialty_detectexplosive", 1);
	setDvar("perk_allow_specialty_explosivedamage", 0);
	setDvar("perk_allow_specialty_pistoldeath", 0);
	setDvar("perk_allow_specialty_grenadepulldeath", 0);
	setDvar("perk_allow_specialty_bulletdamage", 0);
	setDvar("perk_allow_specialty_bulletpenetration", 1);
	setDvar("perk_allow_specialty_bulletaccuracy", 0);
	setDvar("perk_allow_specialty_rof", 0);
	setDvar("perk_allow_specialty_fastreload", 0);
	setDvar("perk_allow_specialty_extraammo", 1);
	setDvar("perk_allow_specialty_armorvest", 0);
	setDvar("perk_allow_specialty_fraggrenade", 0);
	setDvar("perk_allow_specialty_specialgrenade", 0);
	setDvar("perk_allow_c4_mp", 0);
	setDvar("perk_allow_claymore_mp", 0);
	setDvar("perk_allow_rpg_mp", 0);

	setDvar("class_assault_allowdrop", 1);
	setDvar("class_specops_allowdrop", 1);
	setDvar("class_heavygunner_allowdrop", 1);
	setDvar("class_demolitions_allowdrop", 1);
	setDvar("class_sniper_allowdrop", 0);

	setDvar("weap_allow_m16", 1);
	setDvar("weap_allow_ak47", 1);
	setDvar("weap_allow_m4", 1);
	setDvar("weap_allow_g3", 1);
	setDvar("weap_allow_g36c", 1);
	setDvar("weap_allow_m14", 1);
	setDvar("weap_allow_mp44", 1);

	setDvar("attach_allow_assault_none", 1);
	setDvar("attach_allow_assault_gl", 0);
	setDvar("attach_allow_assault_reflex", 1);
	setDvar("attach_allow_assault_silencer", 1);
	setDvar("attach_allow_assault_acog", 1);

	setDvar("weap_allow_mp5", 1);
	setDvar("weap_allow_skorpion", 1);
	setDvar("weap_allow_uzi", 1);
	setDvar("weap_allow_ak74u", 1);
	setDvar("weap_allow_p90", 0);

	setDvar("attach_allow_smg_none", 1);
	setDvar("attach_allow_smg_reflex", 1);
	setDvar("attach_allow_smg_silencer", 1);
	setDvar("attach_allow_smg_acog", 1);

	setDvar("weap_allow_m1014", 1);
	setDvar("weap_allow_winchester1200", 1);
	setDvar("attach_allow_shotgun_none", 1);
	setDvar("attach_allow_shotgun_reflex", 1);
	setDvar("attach_allow_shotgun_grip", 1);

	setDvar("weap_allow_saw", 1);
	setDvar("weap_allow_rpd", 1);
	setDvar("weap_allow_m60e4", 1);

	setDvar("attach_allow_lmg_none", 1);
	setDvar("attach_allow_lmg_reflex", 1);
	setDvar("attach_allow_lmg_grip", 1);
	setDvar("attach_allow_lmg_acog", 1);

	setDvar("weap_allow_dragunov", 1);
	setDvar("weap_allow_m40a3", 1);
	setDvar("weap_allow_barrett", 1);
	setDvar("weap_allow_remington700", 1);
	setDvar("weap_allow_m21", 1);

	setDvar("attach_allow_sniper_none", 1);
	setDvar("attach_allow_sniper_acog", 1);

	setDvar("weap_allow_beretta", 1);
	setDvar("weap_allow_colt45", 1);
	setDvar("weap_allow_usp", 1);
	setDvar("weap_allow_deserteagle", 1);
	setDvar("weap_allow_deserteaglegold", 1);

	setDvar("attach_allow_pistol_none", 1);
	setDvar("attach_allow_pistol_silencer", 1);

	setDvar("weap_allow_frag_grenade", 1);
	setDvar("weap_allow_concussion_grenade", 1);
	setDvar("weap_allow_flash_grenade", 1);
	setDvar("weap_allow_smoke_grenade", 1);

	setDvar("class_assault_limit", 10);
	setDvar("class_specops_limit", 10);
	setDvar("class_heavygunner_limit", 10);
	setDvar("class_demolitions_limit", 10);
	setDvar("class_sniper_limit", 1);

	setDvar("class_assault_movespeed", 0.95);
	setDvar("class_specops_movespeed", 1.00);
	setDvar("class_heavygunner_movespeed", 0.875);
	setDvar("class_demolitions_movespeed", 1.00);
	setDvar("class_sniper_movespeed", 1.00);

	// Default Class Loadouts
	setDvar("class_assault_camo", "camo_none");
	setDvar("class_assault_grenade", "concussion_grenade");
	setDvar("class_assault_perk1", "specialty_extraammo");
	setDvar("class_assault_perk2", "specialty_bulletdamage");
	setDvar("class_assault_perk3", "specialty_bulletpenetration");
	setDvar("class_assault_primary", "m4");
	setDvar("class_assault_primary_attachment", "none");
	setDvar("class_assault_secondary", "beretta");
	setDvar("class_assault_secondary_attachment", "none");
	setDvar("class_assault_special", "1");

	setDvar("class_demolitions_camo", "camo_none");
	setDvar("class_demolitions_frags", "1");
	setDvar("class_demolitions_grenade", "smoke_grenade");
	setDvar("class_demolitions_perk1", "specialty_extraammo");
	setDvar("class_demolitions_perk2", "specialty_bulletdamage");
	setDvar("class_demolitions_perk3", "specialty_bulletpenetration");
	setDvar("class_demolitions_primary", "winchester1200");
	setDvar("class_demolitions_primary_attachment", "none");
	setDvar("class_demolitions_secondary", "beretta");
	setDvar("class_demolitions_secondary_attachment", "none");
	setDvar("class_demolitions_special", "1");

	setDvar("class_heavygunner_camo", "camo_none");
	setDvar("class_heavygunner_frags", "1");
	setDvar("class_heavygunner_grenade", "concussion_grenade");
	setDvar("class_heavygunner_perk1", "specialty_extraammo");
	setDvar("class_heavygunner_perk2", "specialty_bulletdamage");
	setDvar("class_heavygunner_perk3", "specialty_bulletpenetration");
	setDvar("class_heavygunner_primary", "saw");
	setDvar("class_heavygunner_primary_attachment", "none");
	setDvar("class_heavygunner_secondary", "usp");
	setDvar("class_heavygunner_secondary_attachment", "none");
	setDvar("class_heavygunner_special", "1");

	setDvar("class_sniper_camo", "camo_none");
	setDvar("class_sniper_frags", "1");
	setDvar("class_sniper_grenade", "flash_grenade");
	setDvar("class_sniper_perk1", "specialty_extraammo");
	setDvar("class_sniper_perk2", "specialty_bulletdamage");
	setDvar("class_sniper_perk3", "specialty_bulletpenetration");
	setDvar("class_sniper_primary", "m40a3");
	setDvar("class_sniper_primary_attachment", "none");
	setDvar("class_sniper_secondary", "beretta");
	setDvar("class_sniper_secondary_attachment", "silencer");
	setDvar("class_sniper_special", "1");

	setDvar("class_specops_camo", "camo_none");
	setDvar("class_specops_frags", "1");
	setDvar("class_specops_grenade", "flash_grenade");
	setDvar("class_specops_perk1", "specialty_extraammo");
	setDvar("class_specops_perk2", "specialty_bulletdamage");
	setDvar("class_specops_perk3", "specialty_bulletpenetration");
	setDvar("class_specops_primary", "mp5");
	setDvar("class_specops_primary_attachment", "none");
	setDvar("class_specops_secondary", "usp");
	setDvar("class_specops_secondary_attachment", "silencer");
	setDvar("class_specops_special", "1");

}

setModifiers()
{	 
	   setDvar("dam_mod_conc" , 0);
  	   setDvar("dam_enable_modifier" , 0);
     damn\_main::resetWeaponStrings();
}


Go Live/ReadyUp

This file is the main file in the DAMN mod. It controls how the mod works. I've added some extra text in to make it a little more obvious for the noobs that the server IS GOING LIVE.

  1. Open the file "\mlservers\Call of Duty 4\Mods\DAMN\z_svr_modwarfare.iwd" with winrar.
  2. Browse to the "\DAMN" in the file
  3. Edit the contents of _main.gsc file with notepad
  4. Add the _main.gsc to line 1052:
  5. Save & close the _main.gsc file

Additions to "_main.gsc"

// CREATE THE LIVE TEXT , SET ITS CONTENT

	readyLiveText = createServerFontString( "default" , 1.4 );
	readyLiveText setPoint( "CENTER", "CENTER", 0, -60 );
	readyLiveText setText("^1GAME IS FUCKING LIVE");
	readyLiveText.sort = 1001;
	readyLiveText.foreground = false;
	readyLiveText.hideWhenInMenu = true;

	wait 15;

	readyLiveText destroyElem();
		
	iPrintLn("^1Yes really its LIVE");
	wait 5;
	iPrintLn("^1Yes really its LIVE");
	wait 5;
	iPrintLn("^1Yes really its LIVE");

Server Admin Console Commands

These commands are used to administrate the server from the console.

/map mapname
Loads the map specified by mapname.

/map_rotate
Loads next map in rotation set in sv_maprotation.

/serverinfo
Shows the current server's settings.

/map_restart
Restarts the map.

/kick [name]
Kicks a player by name from the server.

/clientkick [id]
Kicks a player by client id from the server.

/status
Displays info of all the players on the server.

/banUser [name]
Bans a user by their ingame name. Writes their GUID to ban.txt

/banClient [id]
Bans a user by their client number. Writes their GUID to ban.txt

/tempBanUser [name]
Kicks and temporarily bans player by name from server.

/tempBanClient [id]
Kicks and temporarily bans player by client id from server

/unban [name]
Unban every player banned with [name]. If you want to unban a single player whose name appears more than once, you should edit "ban.txt" manually.

/tell [id]
Sends private message to specified client id 

/quit 	                    
This terminates the server.
Personal tools