# CFX::GET_TIMECYCLE_MODIFIER_VAR_NAME_BY_INDEX

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

## Signature

```c
char* GET_TIMECYCLE_MODIFIER_VAR_NAME_BY_INDEX(char* modifierName, int modifierVarIndex);
```

## Parameters

- `modifierName` (`char*`) — The name of timecycle modifier.
- `modifierVarIndex` (`int`) — The index of a variable on the specified timecycle modifier.

## Returns

`char*` — The name of a variable by index.

## Usage

### Lua

```lua
local retval = GetTimecycleModifierVarNameByIndex(modifierName, modifierVarIndex)

-- always available, by hash
local retval = Citizen.InvokeNative(0xe874ab1d, modifierName, modifierVarIndex, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetTimecycleModifierVarNameByIndex(modifierName, modifierVarIndex);

// by hash
const retval = Citizen.invokeNative('0xe874ab1d', modifierName, modifierVarIndex, Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0xe874ab1d, modifierName, modifierVarIndex);
```

## Examples

*Source: Cfx.re native reference*

```lua
local varCount = GetTimecycleModifierVarCount("underwater")

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

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

*Sources: Cfx.re native reference.*
