SRCDS Steam group


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SRCDS Multitool [v.2.0.1]
#1
Exclamation 
A little something I coded in batch to make running a Garry's Mod SRCDS a bit easier.

I plan in the next version to have customizable presets in regards to various server variables, and the unrestricted compatibility on all SRCDS compatible Source games.

Features:

- SRCDS Crash Protection (with log file generation)
- Customized SRCDS Launch Parameters
- All-in-one program, just one file is all you need
- Uses fewer CPU cycles compared to SRCDS Guardian 3.0.
- SRCDS Multitool ONLY logs server crashes. Thus results in less disk consumption/usage and a cleaner, easier to read log file.

###DOWNLOAD LINK:###
SRCDS Multitool [v.2.0.1]


Change Log:

<v.2.0> } I cleaned up the code to make it more conducive to adding on and improving the program.

<v.2.0.1> } Fixed minor bug with the watchdog.
Error:
start srcds.exe -console -game garrysmod +map gm_construct +maxplayers 16 -ip 0.0.0.0


======================================================
Code:

@echo off
title Garry's Mod SRCDS Multitool / Coded by robyrobrob [v.2.0.1]
:home
cls
echo What would you like to do?
echo.
echo.
echo 1. Run SRCDS gm_construct Default
echo 2. Run SRCDS gm_flatgrass Default
echo 3. Run SRCDS Custom
echo............................................
echo.
set /p choice1=":> "
If %choice1% == 1 goto construct
If %choice1% == 2 goto flatgrass
If %choice1% == 3 goto custom
cls
echo ERROR: Invalid Selection!
rem Wait 2000
goto home


:construct
cls
set launchmap="gm_construct"
set maxplayer="16"
cd c:\srcds/orangebox
start srcds.exe -console -game garrysmod +map %launchmap% +maxplayers %maxplayer% -ip 0.0.0.0
rem Wait 4000
goto watchdog


:flatgrass
cls
set launchmap="gm_flatgrass"
set maxplayer="16"
cd c:\srcds/orangebox
start srcds.exe -console -game garrysmod +map %launchmap% +maxplayers %maxplayer% -ip 0.0.0.0
rem Wait 4000
goto watchdog


:custom
cls
echo Enter custom SRCDS launch parameters below.
echo.
echo.
set /p launchmap="Map: "
echo.
set /p maxplayer="Max Players: "
echo.
pause
cls
cd c:\srcds/orangebox
start srcds.exe -console -game garrysmod +map %launchmap% +maxplayers %maxplayer% -ip 0.0.0.0
rem Wait 4000
goto watchdog


:watchdog
for /f "usebackq" %%Z in (`tasklist /nh /fi "imagename eq srcds.exe"`) do if %%Z==INFO: goto processnotrunning
echo (%date%)(%time%) Watching server for crashes...
rem Wait 1000
goto watchdog

:processnotrunning
cd c:\srcds
echo (%date%)(%time%) Crash or Close detected!
>> servercrash.log echo (%date%)(%time%) Crash or Close detected!
echo (%date%)(%time%) server is now restarting...
>> servercrash.log echo (%date%)(%time%) server is now restarting...
rem Wait 2000
cd c:\srcds/orangebox
start srcds.exe -console -game garrysmod +map %launchmap% +maxplayers %maxplayer% -ip 0.0.0.0
rem Wait 2000
goto watchdog
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
Reply
#2
myBB 
btw, If anyone wants to check out my build server....

<GMBR> Rob's Sandbox Server

[Image: b_350_20_692108_381007_FFFFFF_000000.png]
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
Reply
#3
You got some issues with your script.

1. After a crash, the options you have selected when starting the server will be ignored.

2. You can only have one instance of this running. It wont work if you run multiple servers.
Reply
#4
Exclamation 
(08-14-2012, 04:21 PM)Nisd Wrote:  You got some issues with your script.

1. After a crash, the options you have selected when starting the server will be ignored.

2. You can only have one instance of this running. It wont work if you run multiple servers.


========================================================

Thank you for your feed-back I will fix that minor problem with the watchdog in a couple of minuets. Sorry for the careless error, I was up to 1am working on the program, and sometimes s*** happens.

Best Regards,

Rob J.
[Image: b_350_20_692108_381007_FFFFFF_000000.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)