MiscClient3 outputs

getCurrWeatherState

GET_CURR_WEATHER_STATE0xF3BBE884A14BB413

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

SignatureJavaScript
getCurrWeatherState(): [
  weatherType1: Hash,
  weatherType2: Hash,
  percentWeather2: number
]
SignatureLua
getCurrWeatherState(): Hash, Hash, number

Usage

JavaScript
const [weatherType1, weatherType2, percentWeather2] =
  getCurrWeatherState();
Lua
local weatherType1, weatherType2, percentWeather2 =
    getCurrWeatherState()

Parameters

None. The game writes the outputs: they are handed back, not passed in.

Returns

3 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1weatherType1Hashnumberintegeroutput
2weatherType2Hashnumberintegeroutput
3percentWeather2floatnumbernumberoutput

On LS:MP

✓
Friendlier helper

lsmp.weather.getState returns the same three values as named fields.

Reference

Namespace
Misc MISC
In the game
void GET_CURR_WEATHER_STATE(Hash* weatherType1, Hash* weatherType2, float* percentWeather2)
Hash
0xF3BBE884A14BB413
Formerly
_GET_WEATHER_TYPE_TRANSITION

Open in the interactive natives reference