SET_CURR_WEATHER_STATE
Old name: _SET_WEATHER_TYPE_TRANSITION
Hash
0xFA3E3CA8A1DE6D5DRuntime name
SetCurrWeatherStateNamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x578C752848ECFA0CSignature
void SET_CURR_WEATHER_STATE(Hash weatherType1, Hash weatherType2, float percentWeather2, BOOL enabled);Parameters
| Name | Type | Description |
|---|---|---|
weatherType1 | Hash | — |
weatherType2 | Hash | — |
percentWeather2 | float | — |
enabled | BOOL | — |
Returns void
Description
Params: BOOL p3 is always true
Old name: _SET_WEATHER_TYPE_TRANSITION
Usage
SetCurrWeatherState(weatherType1, weatherType2, percentWeather2, enabled)
-- always works, by hash
Citizen.InvokeNative(0xFA3E3CA8A1DE6D5D, weatherType1, weatherType2, percentWeather2, enabled)JavaScript and C#
SetCurrWeatherState(weatherType1, weatherType2, percentWeather2, enabled);
// by hash
Citizen.invokeNative('0xFA3E3CA8A1DE6D5D', weatherType1, weatherType2, percentWeather2 + 0.0000001, enabled);Function.Call((Hash)0xFA3E3CA8A1DE6D5D, weatherType1, weatherType2, percentWeather2, enabled);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
See also
GET_CURR_WEATHER_STATEOld name: _GET_WEATHER_TYPE_TRANSITION
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.