# CFX::GET_TIMECYCLE_VAR_NAME_BY_INDEX

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

## Signature

```c
char* GET_TIMECYCLE_VAR_NAME_BY_INDEX(int varIndex);
```

## Parameters

- `varIndex` (`int`) — The index of variable.

## Returns

`char*` — The name of a timecycle variable.

## Description

*Source: Cfx.re native reference*

See [GET_TIMECYCLE_VAR_COUNT](#\_0x838B34D8).

## Usage

### Lua

```lua
local retval = GetTimecycleVarNameByIndex(varIndex)

-- always available, by hash
local retval = Citizen.InvokeNative(0xc6c55aaf, varIndex, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetTimecycleVarNameByIndex(varIndex);

// by hash
const retval = Citizen.invokeNative('0xc6c55aaf', varIndex, Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0xc6c55aaf, varIndex);
```

## 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.*
