timer help [+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: timer help [+REP] (
/showthread.php?tid=581811)
timer help [+REP] -
simo0000 - 15.07.2015
hey guys i need small help
how to make a time like that 00:00 and start 00:20 etc... until it reachs 10:00
and thnx
sorry for my bad english
Re: timer help [+REP] -
iMFear - 15.07.2015
PHP код:
new Hour, Minute, Second; // Create a variable to store the valor of the time.
gettime(Hour, Minute, Second); //Get the current server time, which will be stored in the variables hour, minute and second.
if(Hour == 0 || Minute == 20 || Second == 0) {
//Make Anything here. (Like a variable...)
}
else (Hour == 10 || Minute == 0 || Second == 0) {
//Make Anything here.
}
Re: timer help [+REP] -
Michael B - 15.07.2015
I hope his will help you out:
PHP код:
forward Timer();
public OnGameModeInnit()
{
SetTimer("Timer",600000,0); //1000 = 1sec > 600000 = 10 min.
}
public Timer()
{
// Do something here.
}
Re: timer help [+REP] -
simo0000 - 15.07.2015
thnx +rep for you both rep me back if you want thnx