RedM Natives

SET_WEATHER_CYCLE_ENTRY

Hash0xD264D4E1
Runtime nameSetWeatherCycleEntry
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

BOOL SET_WEATHER_CYCLE_ENTRY(int index, char* typeName, int timeMult);

Parameters

NameTypeDescription
indexint

The index of the entry to set. Must be between 0 and 255

typeNamechar*

The name of the weather type for this cycle

timeMultint

The relative duration of this cycle, which is multiplied by msPerCycle during 'APPLY_WEATHER_CYCLES'. Must be between 1 and 255

Returns BOOL — Returns true if all parameters were valid, otherwise false.

Usage

Lua
local retval = SetWeatherCycleEntry(index, typeName, timeMult)

-- always works, by hash
local retval = Citizen.InvokeNative(0xd264d4e1, index, typeName, timeMult, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = SetWeatherCycleEntry(index, typeName, timeMult);

// by hash
const retval = Citizen.invokeNative('0xd264d4e1', index, typeName, timeMult, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xd264d4e1, index, typeName, timeMult);

Sources

Cfx.re native reference

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