getCurrWeatherState
GET_CURR_WEATHER_STATE0xF3BBE884A14BB413The 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.
getCurrWeatherState(): [
weatherType1: Hash,
weatherType2: Hash,
percentWeather2: number
]getCurrWeatherState(): Hash, Hash, numberUsage
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.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | weatherType1 | Hash | number | integer | output |
| 2 | weatherType2 | Hash | number | integer | output |
| 3 | percentWeather2 | float | number | number | output |
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