View Single Post
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-02-2022 , 15:39   Re: HLSM v2.4.1 - HL Server Monitor
Reply With Quote #68

i buy a new dedicated server, this still not works
i havent choice just wrote some batch file, monitor over psping tool

autosrcds.bat
PHP Code:
@echo off
if not defined in_subprocess (cmd /k set in_subprocess=^& %%*) & exit )

setlocal ENABLEDELAYEDEXPANSION
set count
=0

set p
=C:\steam\steamapps\common\Left 4 Dead 2 Dedicated Server\
set args=-port 27272 "+map c2m1_highway realism" -secure +exec server -game left4dead2 -console +sv_lan 0 -tickrate 60 +sv_gametypes "realism" -high

:start
psping 
/n 2 10.0.16.14:27272 find "Lost = 2"

::0 found network stuck
if !errorlevelequ 0 (
    
set /a count+=1
    
if !countgtr 8 (
        echo 
errors = !count!, %date% - %time%
        echo 
"ready for restart.."
        
timeout 5
        taskkill 
//im "srcds.exe"
        
set count=0
        start 
"l4d2" "%p%srcds" %args%
    ) else (
        echo 
errors = !count!, %date% - %time%
    )
) else (
    
set count=0
    
echo errors = !count!, %date% - %time%
)
timeout 5 >nul
goto :start 
__________________
NoroHime is offline