SA-MP Forums Archive
Time then checkpoint [+REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Time then checkpoint [+REP] (/showthread.php?tid=528187)



Time then checkpoint [+REP] - Clergy - 26.07.2014

hey,

Is there any code that you guys can give me like when its 22:00 on my server its shows a checkpoint to all players.

i dont really know if its possible posting the code as a reply would be big favor.


Re : Time then checkpoint [+REP] - S4t3K - 26.07.2014

Actually, this is possible.

But it's hard to explain correctly

pawn Код:
public OnGameModeInit()
{
      new hour, minutes, seconds;
      gettime(hour, minutes, seconds);
      new hour1, minute1, seconds1;
      if(hour < 22) hour1 = hour-22;
      else hour1 = 24 - hour + 22;
     
      minute1 = 60 - minutes;
      seconds1 -= 60 - seconds;
      new time = hour1*3600000 + minute1 * 60000 + seconds1 * 1000;
      SetTimer("its10pm", time, false);
      return true;
}
Haven't tested it yet (and I think you know that I can't), so I encourage you to do it by yourself.


Re: Time then checkpoint [+REP] - Clad - 26.07.2014

It depends on the time which you gave, We must see it before we can help you