RedM Natives

GET_TIMECYCLE_VAR_COUNT

Returns the amount of variables available to be applied on timecycle modifiers.

Hash0x838B34D8
Runtime nameGetTimecycleVarCount
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

int GET_TIMECYCLE_VAR_COUNT();

Returns int — The amount of available variables for timecycle modifiers.

Description

Cfx.re native reference

Returns the amount of variables available to be applied on timecycle modifiers.

Usage

Lua
local retval = GetTimecycleVarCount()

-- always works, by hash
local retval = Citizen.InvokeNative(0x838b34d8, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetTimecycleVarCount();

// by hash
const retval = Citizen.invokeNative('0x838b34d8', Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x838b34d8);

Examples

LUA · Cfx.re native reference
local varCount = GetTimecycleVarCount()

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleVarNameByIndex(index)
    local varDefault = GetTimecycleVarDefaultValueByIndex(index)

    print(string.format("[%d] %s (%f)", index, varName, varDefault))
  end
end

Sources

Cfx.re native reference

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