该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
这个给服务端用的
新建start.bat粘贴内容
@echo offclsset gameserver=exiletitle %The Fluffy Basement% Kcgamesset link=http://www.Kcgames.netStart iexplore "%link%":startREM How long until auto restart?set hours="4"set minutes="0"set seconds="0"REM // Launch parametersstart "arma3" "arma3server.exe" -enableHT -autoinit -servermod=@ExileServer -mod=@exile -config=@ExileServer\config.cfg -port=2302 -profiles=exile -cfg=@ExileServer\basic.cfg -name=exileREM You do not need to update anything else below this line REM Pull, display and create some time functionsfor /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('yyyyMMddHHmmss')"') do set endtime=%%Gfor /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('HH:mm:ss')"') do set nowtimeclean=%%Gfor /f "delims=" %%G IN ('powershell "(get-date %time%).AddHours(%hours%).AddMinutes(%minutes%).AddSeconds(%seconds%).ToString('HH:mm:ss')"') do set endtimeclean=%%Gecho %time% - %gameserver% Server started at %nowtimeclean% and will restart at %endtimeclean%:checkarmafor /f "delims=" %%G IN ('powershell "(get-date %time%).ToString('yyyyMMddHHmmss')"') do set nowtime=%%GREM // TIMER CHECK ///if "%nowtime%" gtr "%endtime%" (echo %time% - It is time to restart %gameserver%!echo.echo.goto restartarma)REM // END TIMER CHECK ///REM // PROCESS CHECK ///tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | find /I /N "arma3server.exe">NULif "%ERRORLEVEL%"=="1" (echo %time% - The process is not running, restart %gameserver%!echo.echo.goto restartarma)REM // END PROCESS CHECK ///REM restart not needed. Check again in 3 seconds.TIMEOUT /T 3 /NOBREAK >NULgoto checkarma:restartarmaREM Either the server crashed or it is time for a restart. Kill the process and go to start.START taskkill /f /im arma3server.exe 2>nulTIMEOUT /T 3 /NOBREAK >NULgoto start
参数啊,重启时间自己可以改改