ClockClient

getClockHours

GET_CLOCK_HOURS0x25223CA6B4D20B7F

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

SignatureJavaScript
getClockHours(): number
SignatureLua
getClockHours(): integer

Usage

JavaScript
const result = getClockHours();
Lua
local result = getClockHours()

Parameters

None.

Returns

int JavaScript number, Lua integer

Notes

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

Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9)

Reference

Namespace
Clock CLOCK
In the game
int GET_CLOCK_HOURS()
Hash
0x25223CA6B4D20B7F

Open in the interactive natives reference