PDA

View Full Version : Aplicatie care reporneste server dupa ce se blocheaza(win)



tiliean
30-09-2010, 11:13 AM
Varianta I :
Cream un fisier Text Document introducem in el -->
Cod:

@echo on
cls
echo Protejeaza Serverul(hlds)de blokare.
echo Daca vrei sa inchizi serveru si acest script , inchide consola(hlds) si tasteaza Y urmat de enter.
title Server Fara Sa Se Blocheze
:hlds
echo (%time%) serverul a pornit.
start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx
echo (%time%) ATENTIE: serverul a cazut sau a fost oprit. il restartez.
goto hlds


si apoi il salvam sub numele server.bat
Cod:

start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx

Varianta II :
Cream un fisier Text Document introducem in el -->
Cod:

@echo off
cls
echo Protejeaza Serverul(hlds)de blokare.
echo Daca vrei sa inchizi serveru si acest script , inchide consola(hlds) si tasteaza Y urmat de enter.
title Server Fara Sa Se Blocheze
:hlds
echo (%time%) serverul a pornit.
start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx
echo (%time%) ATENTIE: serverul a cazut sau a fost oprit. il restartez.
goto hlds


si apoi il salvam sub numele server.bat
Cod:

start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx

<aceasta> echo on / echo off ( off - sa nu apara acele mesaje , on - sa apara )

Varianta III :
Pentru cei care nu mai doresc deloc acele faze cu "echo" , pot face cum arata mai jos

Cod:

@echo off
cls
title Autorestart
:hlds
echo (%time%) Started
start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx
echo (%time%) Crashed, restarting.
goto hlds



Si batchul nu trebuie pus neaparat in folderul cu hlds.exe

Poti inlocui
Cod:

start /wait /high hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx


Cu
Cod:

start /wait /high C:\HLDS\hlds.exe -console -game cstrike +sv_lan 1 +maxplayers 18 +map de_dust2 -nomaster -noipx



Sau care e calea spre hlds.exe

Prince
13-01-2011, 11:44 AM
Tare, pt cei care li se intrerupe curentu sau cade internetu