Well alot of people are facing this issue in newer version of HLDS downloaded through SteamCMD. Finally i solved the issue, Here is the solution.
This will fix:
- HLDS not starting\crashing instantly.
- Unable to initialize steam.
- Autorestart within seconds on server crash/close.
Code:
@ECHO OFF
:HLDS
REG ADD "HKCU\Software\Valve\Steam\ActiveProcess" /v SteamClientDll /t REG_SZ /d "" /f >nul
:CRASHED
ECHO N| Start /Wait /High hlds.exe -console -game cstrike >nul
CLS
ECHO :------------------------------------------------------------------------:
ECHO :Warning: HLDS Server Crashed At = Date:%Date% - Time:%Time%:
ECHO :------------------------------------------------------------------------:
IF ERRORLEVEL 2 GOTO :RESTART
:RESTART
CHOICE /D /N /T:N,0 >nul 2>&1
IF ERRORLEVEL 2 GOTO :CRASHED
1) Copy this code.
2) Paste it in a notepad.
3) Save file as > Desktop > Filename: "HLDS.bat"
4) Copy "HLDS.bat" in to server folder where HLDS is located.
5) Run "HLDS.bat" & Vola...your server is up and running.
-Cheers BK.