# CFX::SET_RESOURCE_KVP_FLOAT

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

## Signature

```c
void SET_RESOURCE_KVP_FLOAT(char* key, float value);
```

## Parameters

- `key` (`char*`) — The key to set
- `value` (`float`) — The value to write

## Returns

`void`

## Description

*Source: Cfx.re native reference*

A setter for [GET_RESOURCE_KVP_FLOAT](#\_0x35BDCEEA).

## Usage

### Lua

```lua
SetResourceKvpFloat(key, value)

-- always available, by hash
Citizen.InvokeNative(0x9add2938, key, value)
```

### JavaScript

```js
SetResourceKvpFloat(key, value);

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

### C#

```csharp
Function.Call((Hash)0x9add2938, key, 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.

## Examples

*Source: Cfx.re native reference*

```lua
local lickMy = 42.5
SetResourceKvpFloat('bananabread', lickMy)
```

## See also

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

*Sources: Cfx.re native reference.*
