RedM Natives

SET_CURR_WEATHER_STATE

Old name: _SET_WEATHER_TYPE_TRANSITION

Hash0xFA3E3CA8A1DE6D5D
Runtime nameSetCurrWeatherState
NamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x578C752848ECFA0C

Signature

void SET_CURR_WEATHER_STATE(Hash weatherType1, Hash weatherType2, float percentWeather2, BOOL enabled);

Parameters

NameTypeDescription
weatherType1Hash—
weatherType2Hash—
percentWeather2float—
enabledBOOL—

Returns void

Description

Params: BOOL p3 is always true

Old name: _SET_WEATHER_TYPE_TRANSITION

Usage

Lua
SetCurrWeatherState(weatherType1, weatherType2, percentWeather2, enabled)

-- always works, by hash
Citizen.InvokeNative(0xFA3E3CA8A1DE6D5D, weatherType1, weatherType2, percentWeather2, enabled)
JavaScript and C#
JavaScript
SetCurrWeatherState(weatherType1, weatherType2, percentWeather2, enabled);

// by hash
Citizen.invokeNative('0xFA3E3CA8A1DE6D5D', weatherType1, weatherType2, percentWeather2 + 0.0000001, enabled);
C#
Function.Call((Hash)0xFA3E3CA8A1DE6D5D, weatherType1, weatherType2, percentWeather2, enabled);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.