# CFX::SET_RESOURCE_KVP

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

## Signature

```c
void SET_RESOURCE_KVP(char* key, char* value);
```

## Parameters

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

## Returns

`void`

## Description

*Source: Cfx.re native reference*

A setter for [GET_RESOURCE_KVP_STRING](#\_0x5240DA5A).

## Usage

### Lua

```lua
SetResourceKvp(key, value)

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

### JavaScript

```js
SetResourceKvp(key, value);

// by hash
Citizen.invokeNative('0x21c7a35b', key, value);
```

### C#

```csharp
Function.Call((Hash)0x21c7a35b, key, value);
```

## Examples

*Source: Cfx.re native reference*

```lua
SetResourceKvp('mollis', 'vesuvius citrate')
```

## See also

- [CFX::DELETE_RESOURCE_KVP](https://natives.borderlinerp.com/natives/CFX/DELETE_RESOURCE_KVP.md)
- [CFX::FLUSH_RESOURCE_KVP](https://natives.borderlinerp.com/natives/CFX/FLUSH_RESOURCE_KVP.md) — Nonsynchronous operations will not wait for a disk/filesystem flush before returning from a write or delete call.

*Sources: Cfx.re native reference.*
