MiscClient

setRain

SET_RAIN0x643E26EA6E024D92

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

SignatureJavaScript
setRain(intensity: number): void
SignatureLua
setRain(intensity: number)

Usage

JavaScript
setRain(intensity);
Lua
setRain(intensity)

Parameters

ParameterTypeJavaScriptLua
intensityfloatnumbernumber

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.

With an intensity higher than 0.5f, only the creation of puddles gets faster, rain and rain sound won't increase after that.
With an intensity of 0.0f rain and rain sounds are disabled and there won't be any new puddles.
To use the rain intensity of the current weather, call this native with -1f as intensity.

Reference

Namespace
Misc MISC
In the game
void SET_RAIN(float intensity)
Hash
0x643E26EA6E024D92
Formerly
_SET_RAIN_FX_INTENSITY _SET_RAIN_LEVEL

Open in the interactive natives reference