Setting up and running a cod4 server
Posted: 16 Sep 2017 17:13
Unless you have a second computer to dedicate as a server or alot of memory on your play computer what I will post will not be wise to do
I have a second computer that I run my servers on and this is the setup on running a server but it will not explain how to add mods or custom maps
step 1. you need a config file to tell the server your server name and some settings.
i named mine knife.cfg in it is
set sv_hostname "^5Your server name"
set scr_motd ""
sets Administrator "your name"
sets Email "your email"
sets Hosted_By "your squad or your name"
sets Irc ""
sets Location "USA"
sets Url "your web site"
set scr_allow_vote "0" //allow vote 0 no 1 yes
set g_allowvote "0"
set logfile "1"
set g_log "games_mp.log"
set g_logsync "2"
set sv_log_damage "1"
//******************************************************************************
// ANTIFLOODING SETTINGS
//******************************************************************************
//set sv_floodProtect "0"
set sv_floodProtect "4"
set sv_reconnectlimit "3"
set sv_minPing "0"
set sv_maxPing "500"
// Have the clients archive data to save bandwidth on the server
set sv_clientarchive "1"
// Extrapolation between client states
// Enable it so that players with bad connections don't 'teleport'
set g_smoothClients "1"
// Enable the antilag routine inside the game engine (use only when players with
// a huge difference in ping values connect to the server).
// It sets g_antilag, but it's a dynamic dvar so you can set it by
// server load (and by gametype or maps too...)
// 0 = Disabled (default), 1 = Enabled
set scr_antilag "1"
// Force this variable upon all clients. Disabled means that clients use their own defined value.
// 0 = Disabled (default), 15-100 = Max packets (stock cod4 value is 30)
// set scr_cl_maxpackets "0"
set net_noudp "0"
set sv_maxping "650"
set sv_minping "0"
set sv_minrate "5000"
set sv_maxrate "12000"
set sv_connectTimeout "220"
//set sv_fps "20"
set g_antilag "1"
rcon_password "your rcon password" //rcon password
set sv_privatePassword ""
set g_password ""
set scr_spectatefree "2"
set sv_maxclients "64"
set sv_privateclients "2"
set sv_reconnectlimit "3"
set sv_allowAnonymous "0"
set sv_allowdownload "1"
seta sv_wwwDownload "0"
seta sv_wwwDlDisconnected "1"
set sv_timeout "100000"
set sv_zombietime "1"
set g_inactivity "100000"
set g_inactivityspectator "100000"
set sv_disableClientConsole "0"
set cl_autocmd "0"
set sv_cheats "0"
set sv_pure "1"
set g_filterban "0"
set g_banips "0"
set g_no_script_spam "1"
set sv_punkbuster "0"
set sv_floodProtect "1"
//set sv_kickBanTime "30" \\ This is temp ban, bans via PB.
set sv_voice "0"
set sv_voiceQuality "1"
set voice_deadChat "0"
set voice_global "0"
set voice_localEcho "0"
set winvoice_mic_mute "1"
set scr_teambalance "1"
set g_allowvote "0"
set g_compassShowEnemies "0"
set scr_game_allowkillcam "1"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "0"
set scr_game_spectatetype "2"
set scr_game_forceuav "0"
set scr_game_hardpoints "1"
set scr_enable_music 0
set scr_hardpoint_allowartillery "0"
set scr_hardpoint_allowuav "1"
set scr_hardpoint_allowhelicopter "1"
set scr_team_fftype "0"
set scr_team_teamkillspawndelay "0"
set scr_team_kickteamkillers "3"
set scr_player_maxhealth "100"
set scr_player_suicidespawndelay "0"
set scr_player_healthregentime "5"
set scr_player_forcerespawn "1"
set scr_player_sprinttime "8"
set scr_hardcore "1"
set scr_oldschool "0"
set ui_hud_obituaries "1"
set ui_hud_showobjicons "1"
// Game Types and score and time limit
// SD
set scr_sd_bombtimer 40
set scr_sd_defusetime 4
set scr_sd_multibomb 0
set scr_sd_numlives 1
set scr_sd_planttime 4.5
set scr_sd_playerrespawndelay -1
set scr_sd_roundlimit 0
set scr_sd_roundswitch 5
set scr_sd_scorelimit 12
set scr_sd_timelimit 2
set scr_sd_spectatetype "2"
set scr_sd_waverespawndelay 1
set scr_sd_playerrespawndelay -1
// Deathmatch
set scr_game_allowkillcam 1
set scr_dm_playerrespawndelay -1
set scr_dm_waverespawndelay 1
set scr_dm_scorelimit 200
set scr_dm_timelimit unlimited //can be set to any time
set scr_intermission_time 12
set scr_dm_numlives "0"
set scr_dm_spectatetype "2"
// Domination
set scr_dom_scorelimit "200"
set scr_dom_timelimit "12"
set scr_dom_roundlimit "0"
set scr_dom_numlives "0"
set scr_dom_playerrespawndelay "-1"
set scr_dom_waverespawndelay "1"
// Teamdeath Match
set scr_war_scorelimit "1500"
set scr_war_timelimit "15"
set scr_war_roundlimit "0"
set scr_war_numlives "0"
set scr_war_playerrespawndelay "-1"
set scr_war_waverespawndelay "1"
// Sabotoge
set scr_sab_scorelimit "2"
set scr_sab_timelimit "3"
set scr_sab_roundlimit "0"
set scr_sab_roundswitch "1"
set scr_sab_numlives "0"
set scr_sab_bombtimer "40"
set scr_sab_planttime "4"
set scr_sab_defusetime "4"
set scr_sab_hotpotato "0"
set scr_sab_playerrespawndelay "-1"
set scr_sab_waverespawndelay "1"
// King of the Hill
set scr_koth_scorelimit "0"
set scr_koth_timelimit "6"
set scr_koth_roundlimit "0"
set scr_koth_roundswitch "1"
set scr_koth_numlives "0"
set scr_koth_playerrespawndelay "-1"
set scr_koth_waverespawndelay "1"
set koth_autodestroytime "30"
set koth_spawntime "0"
set koth_kothmode "0"
set koth_capturetime "20"
set koth_destroytime "10"
set koth_delayPlayer "0"
set koth_spawnDelay "30"
// "dm" - free for all deathmatch
// "dom" - domination
// "koth" - headquarters
// "sab" - sabotage
// "sd" - search & destroy
// "war" - team deathmatch
set g_gametype "dm"
set sv_mapRotation "gametype dm map mp_crash_snow gametype dm map mp_vacant gametype dm map mp_broadcast gametype dm map mp_shipment gametype dm map mp_convoy gametype dm map mp_showdown gametype dm map mp_pipeline gametype dm map mp_backlot gametype dm map mp_killhouse gametype dm map mp_carentan gametype dm map mp_strike gametype dm map mp_showdown gametype dm map mp_citystreets gametype dm map mp_broadcast gametype dm map mp_killhouse gametype dm map mp_bloc gametype dm map mp_backlot"
see next post for step 2
I have a second computer that I run my servers on and this is the setup on running a server but it will not explain how to add mods or custom maps
step 1. you need a config file to tell the server your server name and some settings.
i named mine knife.cfg in it is
set sv_hostname "^5Your server name"
set scr_motd ""
sets Administrator "your name"
sets Email "your email"
sets Hosted_By "your squad or your name"
sets Irc ""
sets Location "USA"
sets Url "your web site"
set scr_allow_vote "0" //allow vote 0 no 1 yes
set g_allowvote "0"
set logfile "1"
set g_log "games_mp.log"
set g_logsync "2"
set sv_log_damage "1"
//******************************************************************************
// ANTIFLOODING SETTINGS
//******************************************************************************
//set sv_floodProtect "0"
set sv_floodProtect "4"
set sv_reconnectlimit "3"
set sv_minPing "0"
set sv_maxPing "500"
// Have the clients archive data to save bandwidth on the server
set sv_clientarchive "1"
// Extrapolation between client states
// Enable it so that players with bad connections don't 'teleport'
set g_smoothClients "1"
// Enable the antilag routine inside the game engine (use only when players with
// a huge difference in ping values connect to the server).
// It sets g_antilag, but it's a dynamic dvar so you can set it by
// server load (and by gametype or maps too...)
// 0 = Disabled (default), 1 = Enabled
set scr_antilag "1"
// Force this variable upon all clients. Disabled means that clients use their own defined value.
// 0 = Disabled (default), 15-100 = Max packets (stock cod4 value is 30)
// set scr_cl_maxpackets "0"
set net_noudp "0"
set sv_maxping "650"
set sv_minping "0"
set sv_minrate "5000"
set sv_maxrate "12000"
set sv_connectTimeout "220"
//set sv_fps "20"
set g_antilag "1"
rcon_password "your rcon password" //rcon password
set sv_privatePassword ""
set g_password ""
set scr_spectatefree "2"
set sv_maxclients "64"
set sv_privateclients "2"
set sv_reconnectlimit "3"
set sv_allowAnonymous "0"
set sv_allowdownload "1"
seta sv_wwwDownload "0"
seta sv_wwwDlDisconnected "1"
set sv_timeout "100000"
set sv_zombietime "1"
set g_inactivity "100000"
set g_inactivityspectator "100000"
set sv_disableClientConsole "0"
set cl_autocmd "0"
set sv_cheats "0"
set sv_pure "1"
set g_filterban "0"
set g_banips "0"
set g_no_script_spam "1"
set sv_punkbuster "0"
set sv_floodProtect "1"
//set sv_kickBanTime "30" \\ This is temp ban, bans via PB.
set sv_voice "0"
set sv_voiceQuality "1"
set voice_deadChat "0"
set voice_global "0"
set voice_localEcho "0"
set winvoice_mic_mute "1"
set scr_teambalance "1"
set g_allowvote "0"
set g_compassShowEnemies "0"
set scr_game_allowkillcam "1"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "0"
set scr_game_spectatetype "2"
set scr_game_forceuav "0"
set scr_game_hardpoints "1"
set scr_enable_music 0
set scr_hardpoint_allowartillery "0"
set scr_hardpoint_allowuav "1"
set scr_hardpoint_allowhelicopter "1"
set scr_team_fftype "0"
set scr_team_teamkillspawndelay "0"
set scr_team_kickteamkillers "3"
set scr_player_maxhealth "100"
set scr_player_suicidespawndelay "0"
set scr_player_healthregentime "5"
set scr_player_forcerespawn "1"
set scr_player_sprinttime "8"
set scr_hardcore "1"
set scr_oldschool "0"
set ui_hud_obituaries "1"
set ui_hud_showobjicons "1"
// Game Types and score and time limit
// SD
set scr_sd_bombtimer 40
set scr_sd_defusetime 4
set scr_sd_multibomb 0
set scr_sd_numlives 1
set scr_sd_planttime 4.5
set scr_sd_playerrespawndelay -1
set scr_sd_roundlimit 0
set scr_sd_roundswitch 5
set scr_sd_scorelimit 12
set scr_sd_timelimit 2
set scr_sd_spectatetype "2"
set scr_sd_waverespawndelay 1
set scr_sd_playerrespawndelay -1
// Deathmatch
set scr_game_allowkillcam 1
set scr_dm_playerrespawndelay -1
set scr_dm_waverespawndelay 1
set scr_dm_scorelimit 200
set scr_dm_timelimit unlimited //can be set to any time
set scr_intermission_time 12
set scr_dm_numlives "0"
set scr_dm_spectatetype "2"
// Domination
set scr_dom_scorelimit "200"
set scr_dom_timelimit "12"
set scr_dom_roundlimit "0"
set scr_dom_numlives "0"
set scr_dom_playerrespawndelay "-1"
set scr_dom_waverespawndelay "1"
// Teamdeath Match
set scr_war_scorelimit "1500"
set scr_war_timelimit "15"
set scr_war_roundlimit "0"
set scr_war_numlives "0"
set scr_war_playerrespawndelay "-1"
set scr_war_waverespawndelay "1"
// Sabotoge
set scr_sab_scorelimit "2"
set scr_sab_timelimit "3"
set scr_sab_roundlimit "0"
set scr_sab_roundswitch "1"
set scr_sab_numlives "0"
set scr_sab_bombtimer "40"
set scr_sab_planttime "4"
set scr_sab_defusetime "4"
set scr_sab_hotpotato "0"
set scr_sab_playerrespawndelay "-1"
set scr_sab_waverespawndelay "1"
// King of the Hill
set scr_koth_scorelimit "0"
set scr_koth_timelimit "6"
set scr_koth_roundlimit "0"
set scr_koth_roundswitch "1"
set scr_koth_numlives "0"
set scr_koth_playerrespawndelay "-1"
set scr_koth_waverespawndelay "1"
set koth_autodestroytime "30"
set koth_spawntime "0"
set koth_kothmode "0"
set koth_capturetime "20"
set koth_destroytime "10"
set koth_delayPlayer "0"
set koth_spawnDelay "30"
// "dm" - free for all deathmatch
// "dom" - domination
// "koth" - headquarters
// "sab" - sabotage
// "sd" - search & destroy
// "war" - team deathmatch
set g_gametype "dm"
set sv_mapRotation "gametype dm map mp_crash_snow gametype dm map mp_vacant gametype dm map mp_broadcast gametype dm map mp_shipment gametype dm map mp_convoy gametype dm map mp_showdown gametype dm map mp_pipeline gametype dm map mp_backlot gametype dm map mp_killhouse gametype dm map mp_carentan gametype dm map mp_strike gametype dm map mp_showdown gametype dm map mp_citystreets gametype dm map mp_broadcast gametype dm map mp_killhouse gametype dm map mp_bloc gametype dm map mp_backlot"
see next post for step 2