Addition for "
3. Connect to Server" section.
Recently, they updated something in security, and a method for running client via left4dead2.exe (with arguments) in the same machine with a server is no more working.
Instead, here is a walkaround to run the app directly from steam.exe.
I'm attaching the full code of .bat script (to run server + join simultaneously):
Spoiler
PHP Code:
:: For CS:GO
SET "appID=730"
SET "GAME_ALIAS=csgo"
SET "MAP_NAME=de_dust2"
:: set path to your dedicated server''s srcds.exe
SET "SERVER_DIR=E:\server\csgo"
:: Example for L4D2 (remove :: prefixes)
::SET "appID=550"
::SET "GAME_ALIAS=left4dead2"
::SET "MAP_NAME=c1m1_hotel"
::SET "SERVER_DIR=V:\server\l4d2"
SET "IP=192.168.31.4"
SET "PORT=27016"
:: Remove unnecessary optional arguments by your wish
SET OPTIONAL_ARG= -insecure +sv_pure 0 +sv_consistency 0 -debug -condebug
:: set path to your steam.exe
SET "STEAM_DIR=C:\Program Files (x86)\Steam"
:: ===============================
SET "SERVER_ARG= -console -game %GAME_ALIAS% +hostport %PORT% +clientport 27006 +map %MAP_NAME% %OPTIONAL_ARG%"
SET "STEAM_ARG= -applaunch %appID% -dev -console -sw +sv_lan 1 -novid +connect %IP%:%PORT%"
:: ===============================
:: We are launching the client before the server
start "" "%STEAM_DIR%\steam.exe" %STEAM_ARG%
timeout /t 3
:: launching the server
START "" /min "%SERVER_DIR%\srcds.exe" %SERVER_ARG%
For other games, change appID 550 by your game's Id from steam.inf file, and GAME_ALIAS value with an appropriate game name alias.
__________________