SA-MP Forums Archive
GETTIME... I need help with it. - 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: GETTIME... I need help with it. (/showthread.php?tid=603541)



GETTIME... I need help with it. - Scrillex - 24.03.2016

So I want to save played time on mysql how it is possible to save it with gettime function.

All I want to do is basically every one h give an respect point and saving current time on playing.


With best regards Scrillex.


Re: GETTIME... I need help with it. - Golden96 - 24.03.2016

Set up a timer ongamemode init that calls a function to start the hourly timer. You'll need to work out how many minutes are left until the hour ends, so something like (ongamemodeinit
PHP код:
    new hms;
    
gettime(hms);
    
SetTimer("Timer_InitiateHourTimer", (60-m)*600000); 
then have that timer call another timer with the interval of 60,000 ms (1hr) and connect it to a function to give all connected players a respect point


Re: GETTIME... I need help with it. - Scrillex - 24.03.2016

Timers ain't a good thing so yeah thats why I'm looking for a possible thought UNIXTIME STAMP OR GETTIME!