StatsClientBlocked

statGetNumberOfHours

STAT_GET_NUMBER_OF_HOURS0xF2D4B2FE415AAFC3

The GTA V native STAT_GET_NUMBER_OF_HOURS of the STATS namespace, as LS:MP client scripts call it: the global function statGetNumberOfHours, in JavaScript and in Lua.

SignatureJavaScript
statGetNumberOfHours(statName: Hash): number
SignatureLua
statGetNumberOfHours(statName: Hash): integer
✕
Blocked for scripts: Rockstar accounts and commerce

Resources do not touch Rockstar accounts, Social Club data, GTA$ or the game's online shops. Keep your own economy and profiles on your server, with storage.

Calling it raises disabled by LSMP script policy, which try / catch (JavaScript) or pcall (Lua) can intercept. Nothing reaches the game. See Blocked natives.

Reference

Namespace
Stats STATS
In the game
int STAT_GET_NUMBER_OF_HOURS(Hash statName)
Hash
0xF2D4B2FE415AAFC3

Open in the interactive natives reference