# PAD::GET_CONTROL_VALUE

- **Hash:** `0xD95E79E8686D2C27`
- **Namespace:** PAD
- **Runtime name (Lua/JS):** `GetControlValue`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PAD/GET_CONTROL_VALUE

## Signature

```c
int GET_CONTROL_VALUE(int control, Hash action);
```

## Parameters

- `control` (`int`)
- `action` (`Hash`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = GetControlValue(control, action)

-- always available, by hash
local retval = Citizen.InvokeNative(0xD95E79E8686D2C27, control, action, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetControlValue(control, action);

// by hash
const retval = Citizen.invokeNative('0xD95E79E8686D2C27', control, action, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xD95E79E8686D2C27, control, action);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

*Sources: alloc8or RDR3 NativeDB.*
