ClockClientChecked by LS:MP

setClockTime

SET_CLOCK_TIME0x47C3B5848C3E45D8

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

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

Usage

JavaScript
setClockTime(hour, minute, second);
Lua
setClockTime(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.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

setClockTime(12, 34, 56);

Reference

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

Open in the interactive natives reference