RedM Natives

GET_CURR_WEATHER_STATE

Old name: _GET_WEATHER_TYPE_TRANSITION

Hash0x0AC679B2342F14F2
Runtime nameGetCurrWeatherState
NamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF3BBE884A14BB413

Signature

void GET_CURR_WEATHER_STATE(Hash* weatherType1, Hash* weatherType2, float* percentWeather2);

Parameters

NameTypeDescription
weatherType1Hash*—
weatherType2Hash*—
percentWeather2float*—

Returns void

Description

Params: percentWeather2: 0f - 0.75f in R* Scripts

Old name: _GET_WEATHER_TYPE_TRANSITION

Usage

Lua
local weatherType1, weatherType2, percentWeather2 = GetCurrWeatherState()

-- always works, by hash
local weatherType1, weatherType2, percentWeather2 = Citizen.InvokeNative(0x0AC679B2342F14F2, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueFloat())
JavaScript and C#
JavaScript
const [weatherType1, weatherType2, percentWeather2] = GetCurrWeatherState();

// by hash
const [weatherType1, weatherType2, percentWeather2] = Citizen.invokeNative('0x0AC679B2342F14F2', Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueFloat());
C#
var weatherType1 = new OutputArgument();
var weatherType2 = new OutputArgument();
var percentWeather2 = new OutputArgument();
Function.Call((Hash)0x0AC679B2342F14F2, weatherType1, weatherType2, percentWeather2);
// weatherType1.GetResult<int>()
// weatherType2.GetResult<int>()
// percentWeather2.GetResult<float>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

See also

Sources

alloc8or RDR3 NativeDB

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