AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Questions (https://forums.alliedmods.net/forumdisplay.php?f=74)
-   -   Script to run Left 4 Dead 2 (https://forums.alliedmods.net/showthread.php?t=165716)

K o T 08-26-2011 02:02

Script to run Left 4 Dead 2
 
Code:
@echo off cls echo Protecting srcds from crashes... <font color="#00eeff">echo</font> <font color="#0000ff">If</font> you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter. <font color="#00eeff">title</font> <font color="#0000dd">25100</font> Watchdog :srcds echo <font color="#000000">(</font>%time%<font color="#000000">)</font> l4d2-server1 started. <font color="#00eeff">start</font> /wait srcds.<font color="#00eeff">exe</font> -tickrate <font color="#0000dd">100</font> -restart -console -game left4dead2 +port <font color="#0000dd">27016</font> +maxplayers <font color="#0000dd">8</font> -nowatchdog -debug +fps_max <font color="#0000dd">600</font> +map c5m3_cemetery versus +exec l4d2-vs1.<font color="#00eeff">cfg</font> +map c1m1_hotel versus echo <font color="#000000">(</font>%time%<font color="#000000">)</font> WARNING: l4d2-server1 closed or crashed, restarting. <font color="#0000ff">goto</font> srcds


Tell me how to do it properly

rautamiekka 08-27-2011 04:18

Re: Script to run Left 4 Dead 2
 
The code can't be on one line.

K o T 08-28-2011 05:24

Re: Script to run Left 4 Dead 2
 
Quote:

@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title 25100 Watchdog
:srcds
echo (%time%) l4d2-server1 started.
start /wait srcds.exe -tickrate 100 -restart -console -game left4dead2 +port 27016 +maxplayers 8 -nowatchdog -debug +fps_max 600 +map c5m3_cemetery versus +exec l4d2-vs1.cfg +map c1m1_hotel versus
echo (%time%) WARNING: l4d2-server1 closed or crashed, restarting.
goto srcds

rautamiekka 08-28-2011 15:01

Re: Script to run Left 4 Dead 2
 
I think you need an empty line between the code belonging to the §srcds§ procedure and the code not belonging; sounds like the script mistakes the rest of the code belonging to it and thus doesn't know what to do.

Try this:
Code:

@echo off
cls
echo SrcDS will be started on crash/quit ...
echo If you want to close SrcDS and this script, close the SrcDS window and answer positively to whether to end the script.
title l4d2-server1 Watchdog

:srcds
echo (%time%) l4d2-server1 started.
start /wait srcds.exe -tickrate 100 -restart -console -game left4dead2  +port 27016 +maxplayers 8 -nowatchdog -debug +fps_max 600 +map  c5m3_cemetery versus +exec l4d2-vs1.cfg +map c1m1_hotel versus
echo (%time%) WARNING: l4d2-server1 closed or crashed, restarting.

goto srcds


K o T 08-29-2011 03:08

Re: Script to run Left 4 Dead 2
 
In any case, thanks for the help


All times are GMT -4. The time now is 23:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.