Time::setClockTime
Jump to navigation
Jump to search
SET_CLOCK_TIME(12, 34, 56);
Syntax
mp.game.time.setClockTime(hour, minute, second);Required Arguments
- hour: int
- minute: int
- second: int
Return value
- Undefined
Example
//Realtime
const date = new Date();
function syncTime() {
mp.game.time.setClockTime(date.getHours(), date.getMinutes(), date.getSeconds());
}
setInterval(syncTime, 2000);