MiscClient

setTimeScale

SET_TIME_SCALE0x1D408577D440E81E

The GTA V native SET_TIME_SCALE of the MISC namespace, as LS:MP client scripts call it: the global function setTimeScale, in JavaScript and in Lua.

SignatureJavaScript
setTimeScale(timeScale: number): void
SignatureLua
setTimeScale(timeScale: number)

Usage

JavaScript
setTimeScale(timeScale);
Lua
setTimeScale(timeScale)

Parameters

ParameterTypeJavaScriptLua
timeScalefloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

Maximum value is 1.
At a value of 0 the game will still run at a minimum time scale.

Slow Motion 1: 0.6
Slow Motion 2: 0.4
Slow Motion 3: 0.2

Reference

Namespace
Misc MISC
In the game
void SET_TIME_SCALE(float timeScale)
Hash
0x1D408577D440E81E

Open in the interactive natives reference