ClockClientChecked by LS:MP

setClockDate

SET_CLOCK_DATE0xB096419DF0D06CE7

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

SignatureJavaScript
setClockDate(day: number, month: number, year: number): void
SignatureLua
setClockDate(day: integer, month: integer, year: integer)

Usage

JavaScript
setClockDate(day, month, year);
Lua
setClockDate(day, month, year)

Parameters

ParameterTypeJavaScriptLua
dayintnumberinteger
monthintnumberinteger
yearintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

Use a valid Gregorian date with month from 0 (January) to 11 (December) and year from 1898 to 2499. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
Clock CLOCK
In the game
void SET_CLOCK_DATE(int day, int month, int year)
Hash
0xB096419DF0D06CE7

Open in the interactive natives reference