# CFX::SET_VISUAL_SETTING_FLOAT

- **Hash:** `0xD1D31681`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetVisualSettingFloat`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_VISUAL_SETTING_FLOAT

## Signature

```c
void SET_VISUAL_SETTING_FLOAT(char* name, float value);
```

## Parameters

- `name` (`char*`) — The name of the value to set, such as `pedLight.color.red`.
- `value` (`float`) — The value to write.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Overrides a floating point value from `visualsettings.dat` temporarily.

## Usage

### Lua

```lua
SetVisualSettingFloat(name, value)

-- always available, by hash
Citizen.InvokeNative(0xd1d31681, name, value)
```

### JavaScript

```js
SetVisualSettingFloat(name, value);

// by hash
Citizen.invokeNative('0xd1d31681', name, value + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0xd1d31681, name, value);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [CFX::GET_VISUAL_SETTING_FLOAT](https://natives.borderlinerp.com/natives/CFX/GET_VISUAL_SETTING_FLOAT.md) — A getter for SET_VISUAL_SETTING_FLOAT.

*Sources: Cfx.re native reference.*
