ClockClientChecked by LS:MP

advanceClockTimeTo

ADVANCE_CLOCK_TIME_TO0xC8CA9670B9D83B3B

The GTA V native ADVANCE_CLOCK_TIME_TO of the CLOCK namespace, as LS:MP client scripts call it: the global function advanceClockTimeTo, in JavaScript and in Lua.

SignatureJavaScript
advanceClockTimeTo(hour: number, minute: number, second: number): void
SignatureLua
advanceClockTimeTo(hour: integer, minute: integer, second: integer)

Usage

JavaScript
advanceClockTimeTo(hour, minute, second);
Lua
advanceClockTimeTo(hour, minute, second)

Parameters

ParameterTypeJavaScriptLua
hourintnumberinteger
minuteintnumberinteger
secondintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

hour must be between 0 and 23. minute and second must be between 0 and 59. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
Clock CLOCK
In the game
void ADVANCE_CLOCK_TIME_TO(int hour, int minute, int second)
Hash
0xC8CA9670B9D83B3B

Open in the interactive natives reference