Not the best documented batch script I've posted, but it does the job.
Create a new text file and name is GMod_Server_Start.bat
Make sure it's a .bat and not a .txt
Enter this into the bat file:
Code:
::=======================::
:: SRCDS Guardian ::
:: Black-Sky ::
:: Drocona ::
:: ::
:: EDITED FOR KILLER582 ::
:: BY MOOGA ::
:: ::
:: Gmod Version ::
::=======================::
::This will make the window clear, remove all paths etc, just to keep the important stuff
@echo off
::Give a name to the window, nothing really important.
title SRCDS Guardian Killer582s Garrys Mod Server
::Clear the window
cls
::Report to console what we are doing
echo ****To close this script, close this windows and then the SRCDS window****
echo.
echo.
echo Watching the Garry's Mod SRCDS for crashes
>> GMod_Guardian.log echo.
>> GMod_Guardian.log echo (%date%)(%time%) Started up SRCDS Guardian for Garry's Mod.
::Insert a return point if it crashes
:srcds
echo (%date%)(%time%) Garry's Mod Server is now online.
>> GMod_Guardian.log echo (%date%)(%time%) Garry's Mod Server is now online.
::Start the actual server
start /wait "C:\Documents and setings\Dan Young\Desktop\Public_Installer\Server\Orangebox\srcds.exe" -console -game garrysmod -maxplayers 24 +fps_max 200 -port 27015 +map gm_flatgrass -tickrate 100
echo (%date%)(%time%) Garry's Mod Server crashed or closed. Now restarting...
>> GMod_Guardian.log echo (%date%)(%time%) Garry's Mod Server crashed or closed. Now restarting...
::Server crashed or closed, so we point it to the return point to start the server again
goto srcds
Run the bat file to run your server (theoretically)
Feel free to make any changes to the start up line.
And a note to anyone who thinks I've just been as ass to everyone:
I'm actually helping this guy out!
Oh ya, and remember to search and read the FAQ