Gettime

From SA-MP Wiki

Jump to: navigation, search

Gettime


Get the current server time, which will be stored in the variables &hour, &minute and &second.
Parameters:
(&hour=0,&minute=0,&second=0)
&hour=0The variable to store the hour in, passed by reference.
&minute=0The variable to store the minute in, passed by reference.
&second=0The variable to store the seconds in, passed by reference.


ReturnsThe number of seconds since midnight, 1 January 1970.


new Hour, Minute, Second;
gettime(Hour, Minute, Second);
printf("%02d:%02d:%02d", Hour, Minute, Second);
 
new Seconds = gettime();
printf("%d", Seconds);
Personal tools