# CFX::GET_EXTERNAL_KVP_STRING

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

## Signature

```c
char* GET_EXTERNAL_KVP_STRING(char* resource, char* key);
```

## Parameters

- `resource` (`char*`) — The resource to fetch from.
- `key` (`char*`) — The key to fetch

## Returns

`char*` — A string that contains the value stored in the Kvp or nil/null if none.

## Description

*Source: Cfx.re native reference*

A getter for [SET_RESOURCE_KVP](#\_0x21C7A35B), but for a specified resource.

## Usage

### Lua

```lua
local retval = GetExternalKvpString(resource, key)

-- always available, by hash
local retval = Citizen.InvokeNative(0x9080363a, resource, key, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetExternalKvpString(resource, key);

// by hash
const retval = Citizen.invokeNative('0x9080363a', resource, key, Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0x9080363a, resource, key);
```

## Examples

*Source: Cfx.re native reference*

```lua
local kvpValue = GetExternalKvpString('food', 'codfish') 
if kvpValue then
	-- do something!
end
```

*Sources: Cfx.re native reference.*
