class Clock
package fivem.client.natives
Static methods
staticaddToClockTime(hours:Int, minutes:Int, seconds:Int):Dynamic
staticadvanceClockTimeTo(hour:Int, minute:Int, second:Int):Dynamic
staticgetClockDayOfMonth():Int
staticgetClockDayOfWeek():Int
Gets the current day of the week.
0: Sunday
1: Monday
2: Tuesday
3: Wednesday
4: Thursday
5: Friday
6: Saturday staticgetClockHours():Int
Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9) staticgetClockMonth():Int
staticgetClockSeconds():Int
Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in GTA is only 48 minutes in real life. staticgetClockYear():Int
staticgetLocalTime(year:Dynamic, month:Dynamic, day:Dynamic, hour:Dynamic, minute:Dynamic, second:Dynamic):Dynamic
Gets local system time as year, month, day, hour, minute and second.
Example usage:
int year;
int month;
int day;
int hour;
int minute;
int second;
or use std::tm struct
TIME::GET_LOCAL_TIME(&year, &month, &day, &hour, &minute, &second); staticgetMillisecondsPerGameMinute():Int
Returns how many real ms are equal to one game minute.
A getter for SetMillisecondsPerGameMinute.
staticgetPosixTime(year:Dynamic, month:Dynamic, day:Dynamic, hour:Dynamic, minute:Dynamic, second:Dynamic):Dynamic
Gets system time as year, month, day, hour, minute and second.
Example usage:
int year;
int month;
int day;
int hour;
int minute;
int second;
TIME::GET_POSIX_TIME(&year, &month, &day, &hour, &minute, &second); staticgetUtcTime(year:Dynamic, month:Dynamic, day:Dynamic, hour:Dynamic, minute:Dynamic, second:Dynamic):Dynamic
Gets current UTC time