PDA

View Full Version : Time then checkpoint [+REP]


Clergy
26/07/2014, 06:36 PM
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.

S4t3K
26/07/2014, 06:53 PM
Actually, this is possible.

But it's hard to explain correctly



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.

Clad
26/07/2014, 08:04 PM
It depends on the time which you gave, We must see it before we can help you