automatic server restarter
#1

hi, where can i find automatic server restart (with /gmx)

pls help^^
Reply
#2

Код:
if(strcmp(cmd, "/gmx", true) == 0)
{
   if (IsPlayerAdmin(playerid)) return GameModeExit();
   else return SendClientMessage(playerid, RED, "You are not a admin!");
}
but it restart only your Gamemode not your FS
Reply
#3

ty, but i mean that he restart automatic without my command! u know what i mean??

sry 4 my english
Reply
#4

if your server crash?
Reply
#5

or after a specific time?
(sorry 4 the second post)
Reply
#6

yes that i want too

and I meant, that the server does /gmx by himself at a certain time, for example 04:00 in the morning
Reply
#7

than use a timer ^^ and say it should restart after 24 hours and start the server at 04.00 in the morning
Reply
#8

yes sorry.. can u help me?
Reply
#9

Код:
forward gmx();

//ongamemodeint
SetTimer("gmx", 86400000, 1);

// and on the buttom of your script
public gmx()
{
	GameModeExit();
	return 1;
}
Reply
#10

thx and when it restart?
Reply
#11

86400000 is 24 hours its in milliseconds
start the server at 4.00 and it restart at 4.00
Reply
#12

is there a other method??
Reply
#13

i dont know sorry
Reply
#14

try this one

http://forum.sa-mp.com/index.php?topic=17018.0

Yom's Server restarter v1.41

Gr DarkplayeR
Reply
#15

Shock: If the server crashed or something thats just not going to work.

Instead of mocking people about posting in the wrong topic and editing their topic to "-", get off your ass and go and learn some logic.

DauerDicht: Use GetTime();
Reply
#16

Restarts the server everytime when its 4am:
Код:
SetTimer("RestartServer",1000,1);

public RestartServer()
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(Hour == 4 && Minute == 0 && Second <= 4) return SendRconCommand("gmx");
return true;
}
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)