# CFX::GET_TIMECYCLE_VAR_COUNT

- **Hash:** `0x838B34D8`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetTimecycleVarCount`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_TIMECYCLE_VAR_COUNT

## Signature

```c
int GET_TIMECYCLE_VAR_COUNT();
```

## Returns

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

## Description

*Source: Cfx.re native reference*

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

## Usage

### Lua

```lua
local retval = GetTimecycleVarCount()

-- always available, by hash
local retval = Citizen.InvokeNative(0x838b34d8, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetTimecycleVarCount();

// by hash
const retval = Citizen.invokeNative('0x838b34d8', Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x838b34d8);
```

## Examples

*Source: Cfx.re native reference*

```lua
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.*
