BO1 auto restarter
-
so this does the job for restarting my bo1 server since the session modify error hasnt been fixed, would there be anyway for me to get how many players are on the server currently in a bat file?
Echo on
:serverstart
cls
start C:\Users\Weedliketoosmoke\Desktop\plutonium-bo2-server!start_zm_server.bat
timeout /t 10
call getCmdPID
set "current_pid=%errorlevel%"
for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq cmd.exe"') do (
if "%%a" neq "%current_pid%" (
TASKKILL /PID %%a /f >nul 2>nul
)
)
for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq plutonium-bootstrapper-win32.exe"') do (
if "%%a" neq "%current_pid%" (
TASKKILL /PID %%a /f >nul 2>nul
)
)
goto serverstart -
Gonna give this a little bump since it would be incredibly useful..
Or in other words,
Same. -
alnoise u need GetCmdPID.exe for it to work put it in the same directory as the bat