Counter-Strike Source

From MonsterLANWiki

Jump to: navigation, search

Contents

Server Scripts

The following are the scripts & config files used to run the Counter-Strike Source Servers on Windows XP for MonsterLAN.

Start Script

This is the windows server start script for Counter-Strike: Source. This is file is called MLServer.bat and must be put in the server directory (\mlservers\hl2server\cstrike\MLcomp).

@echo off

rem // variable 1 is the server number. //
rem // variable 2 is the round number. //

:servercheck
rem // which server should we start? //
IF %1 == 1 GOTO portset
IF %1 == 2 GOTO portsetAlt
IF %1 == 3 GOTO portset
IF %1 == 4 GOTO portsetAlt
IF %1 == 5 GOTO portset
IF %1 == 6 GOTO portsetAlt
IF %1 == 7 GOTO portset
IF %1 == 8 GOTO portsetAlt
IF %1 == 0 GOTO publicserver
GOTO roundcheck

:portset
set serverport=27016
set tvportvalue=27020
GOTO roundcheck

:portsetAlt
set serverport=27017
set tvportvalue=27021
GOTO roundcheck

:roundcheck
rem // which round should we start? //
IF %2 == 1 GOTO mapone
IF %2 == 2 GOTO maptwo
IF %2 == 3 GOTO mapthree
IF %2 == 4 GOTO mapfour
IF %2 == 5 GOTO mapfive
IF %2 == 0 GOTO publicserver
GOTO compserver

:mapOne
set servermap=de_cbble
GOTO compserver

:mapTwo
set servermap=de_train
GOTO compserver

:mapThree
set servermap=de_nuke
GOTO compserver

:mapFour
set servermap=de_dust2
GOTO compserver

:mapFive
set servermap=de_inferno
GOTO compserver

:compserver
echo ::: STARTING SERVER %1 - ROUND %2 :::
start "Comp Server %1" /high C:\mlservers\hl2server\srcds.exe -console -game cstrike -port %serverport% +map %servermap% +exec ml_match.cfg +hostname "MonsterLAN Tournament Server %1" -tickrate 100 +fps_max 600 +maxplayers 12 +tv_name "MonsterLAN TV%1" +tv_title "MonsterLAN Tournament TV" +tv_password monster +tv_port %tvportvalue%
GOTO end


:publicserver
echo ::: STARTING PUBLIC SERVER :::
start "Public Server" /high C:\mlservers\hl2server\srcds.exe -console -game cstrike -port 27016 +map de_dust2 +exec ml_public.cfg +hostname "MonsterLAN Public Server" -tickrate 100 +fps_max 600 +maxplayers 33 +tv_name "MonsterLAN TV-Pub" +tv_title "MonsterLAN TV CSS Public"
GOTO end

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

Configs

These files are put in the server config directory (mlservers\hl2server\cstrike\cfg).

Public Server

This file is the public server config. This file is called: ml_public.cfg

//Official MonsterLAN Match Config

rcon_password password// Enter your RCON password here before the double slashes

hostname "MonsterLAN Public Server"

sv_lan 1
sv_maxupdaterate 120
sv_minupdaterate 20 
sv_unlag 1 
sv_maxunlag .5 
sv_voiceenable 1 
sv_minrate  10000
sv_maxrate 30000
sv_mincmdrate 30
sv_maxcmdrate 100
sv_minupdaterate 30
sv_maxupdaterate 100
sv_client_predict 1
sv_client_interpolate 1
sv_client_interp 0.01
sv_client_cmdrate_difference 30

mp_autokick 0 
mp_spawnprotectiontime 0 
mp_autocrosshair 0 
mp_autoteambalance 1 
mp_buytime .25 
mp_c4timer 35 
mp_dynamicpricing 0
mp_fadetoblack 0 // changed to avoid screenhack
mp_flashlight 1  
mp_forcecamera 1
mp_footsteps 1 

mp_freezetime 7 // down from 15
mp_friendlyfire 1 
mp_hostagepenalty 0 
mp_limitteams 5
mp_maxrounds 15 // no limit to prevent changelevel
mp_winlimit 0 //essentially best of 15
mp_playerid 0 
mp_roundtime 1.75
mp_timelimit 40
mp_tkpunish 0 
mp_startmoney 800 

sv_airaccelerate 10 
sv_allowdownload 0 // turned off to reduce unnecessary traffic
sv_allowupload 0 // turned off to reduce unnecessary traffic
sv_alltalk 0
tv_enable 1 // turned on for spectatorization
tv_maxclients 1
tv_transmitall 0
tv_delay 90
tv_relaypassword mltv
sv_cheats 0 
sv_friction 4
sv_gravity 800 
sv_maxrate 30000 // legal values for this setting are between 9999 and 30000 
sv_maxspeed 320 
sv_minrate 0 
sv_stepsize 18 
sv_stopspeed 75 
sv_timeout 65
sv_voicecodec vaudio_miles

mp_allowspectators 0 //turned off, hltv is on instead
decalfrequency 60 
host_framerate 0 
setpause 0
mp_logdetail 3 
log on

say "MonsterLAN Public Config Has Been Executed"

Match

This file is the match config. This file is called: ml_match.cfg

//Official MonsterLAN Match Config

rcon_password password// Enter your RCON password here before the double slashes

hostname "MonsterLAN Comp Server"

sv_lan 1
sv_maxupdaterate 120
sv_minupdaterate 20 
sv_unlag 1 
sv_maxunlag .5 
sv_voiceenable 1 
sv_minrate  10000
sv_maxrate 30000
sv_mincmdrate 30
sv_maxcmdrate 100
sv_minupdaterate 30
sv_maxupdaterate 100
sv_client_predict 1
sv_client_interpolate 1
sv_client_interp 0.01
sv_client_cmdrate_difference 30

mp_autokick 0 
mp_spawnprotectiontime 0 
mp_autocrosshair 0 
mp_autoteambalance 0 
mp_buytime .25 
mp_c4timer 35 
mp_dynamicpricing 0
mp_fadetoblack 1 // changed to avoid screenhack
mp_flashlight 1  
mp_forcecamera 1
mp_footsteps 1 

mp_freezetime 7 // down from 15
mp_friendlyfire 1 
mp_hostagepenalty 0 
mp_limitteams 5
mp_maxrounds 6
mp_winlimit 6
mp_playerid 0 
mp_roundtime 1.30
mp_timelimit 999
mp_tkpunish 0 
mp_startmoney 800 

sv_airaccelerate 10 
sv_allowdownload 0 // turned off to reduce unnecessary traffic
sv_allowupload 0 // turned off to reduce unnecessary traffic
sv_alltalk 0
tv_enable 1 // turned on for spectatorization
tv_maxclients 1
tv_transmitall 0
tv_delay 90
tv_delaymapchange 1
tv_relaypassword mltv
sv_cheats 0 
sv_friction 4
sv_gravity 800 
sv_maxrate 30000 // legal values for this setting are between 9999 and 30000 
sv_maxspeed 320 
sv_minrate 0 
sv_stepsize 18 
sv_stopspeed 75 
sv_timeout 65
sv_voicecodec vaudio_miles

mp_allowspectators 0 //turned off, hltv is on instead
decalfrequency 60 
host_framerate 0 
setpause 0
mp_logdetail 3 
log on

say "MonsterLAN Match Config Has Been Executed"

Go Live

This file is used to tell the gamers when the server is going live so the game can start. It restarts the server 3 times and tells them the game is live via the in game chat. The file is called: ml_golive.cfg

// Aliases
alias w "wait"
alias w5 "w;w;w;w;w;"
alias w10 "w;w;w;w;w;w;w;w;w;w;"
alias w100 "w10;w10;w10;w10;w10;w10;w10;w10;w10;"
alias wBIG "w100;w100;w100;w100;"
alias lo0 "say --- LIVE ON THREE RESTARTS ---;"
alias lo1 "wBIG;mp_restartgame 1; wBIG;"
alias lo2 "wBIG;mp_restartgame 1; wBIG;"
alias lo3 "wBIG;mp_restartgame 1; wBIG; wBIG;"
alias lo4 "say [------------];w5;lo5;"
alias lo5 "say [E-----------];w5;lo6;"
alias lo6 "say [VE----------];w5;lo7;"
alias lo7 "say [IVE---------];w5;lo8;"
alias lo8 "say [LIVE--------];w5;lo9;"
alias lo9 "say [-LIVE-------];w5;lo10;"
alias lo10 "say [--LIVE------];w5;lo11;"
alias lo11 "say [---LIVE-----];w5;lo12;"
alias lo12 "say [----LIVE----];w5;lo13;"
alias lo13 "say [-----LIVE---];w5;lo14;"
alias lo14 "say [------LIVE--];w5;lo15;"
alias lo15 "say [-------LIVE-];w5;lo16;"
alias lo16 "say [--------LIVE];w5;lo17;"
alias lo17 "say [E--------LIV];w5;lo18;"
alias lo18 "say [VE--------LI];w5;lo19;"
alias lo19 "say [IVE--------L];w5;lo20;"
alias lo20 "say [LIVE--------];w5;lo21;"
alias lo21 "say [-LIVE-------];w5;lo22;"
alias lo22 "say [--LIVE------];w5;lo23;"
alias lo23 "say [---LIVE-----];w5;lo24;"
alias lo24 "say [----LIVE----];w5;lo25;"
alias lo25 "say [----LIVE----];w5;lo26;"
alias lo26 "say [----LIVE----];w5;lo27;"
alias lo27 "say [----LIVE----];w5;lo28;"
alias lo28 "say [----LIVE----];"

// Execute
lo0
lo1
lo2
lo3
lo4

Server Admin Console Commands

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

exec MLComp\ml_golive.cfg   This will restart the server 3 times & say that the server is going live.
say <text>  	            Say something in-game as Console: <text>
changelevel <map> 	    Change the level of play (Example: de_dust2)
stats 	                    This will show a table with CPU usage and stuff on the server.
restartgame <x> 	    This will restart the game (NOT the server) in <x> seconds.
kickid <number>  	    Kick someone from the game, using the UserID or SteamID.
banid <x> <y> kick 	    Ban <x> in minutes (0=permanent) <y> User or SteamID.
addip <x> <z> kick 	    Ban by IP <x> same as above <z> IP-address of player.
removeid <p> 	            Remove ban for <p> by SteamID.
removeip <q> 	            Remove ban for <q> by IP-address.
quit 	                    This terminates the server.
Personal tools