Server restart
#1

Hello

How to do a system where server restarts in every automatically when it is 04:00 o`clock?
Reply
#2

You could use https://sampwiki.blast.hk/wiki/Gettime and then just check if the variable hour is 4.
Reply
#3

pawn Код:
//put under gamemode int
SetTimer("RestartServer", 1000, true);//checks to see if its the 4th hour of the day every second
//put at the top
forward RestartServer();
//somewhere at the bottom
public RestartServer()
{
  new Hour, Minute, Second;
  gettime(Hour, Minute, Second);
  if(Hour == 4)
  {
  SendRconCommand("gmx");
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)