# PAD::_SET_CONTROL_CONTEXT

- **Hash:** `0x2804658EB7D8A50B`
- **Namespace:** PAD
- **Runtime name (Lua/JS):** `SetControlContext`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PAD/_SET_CONTROL_CONTEXT

## Signature

```c
void _SET_CONTROL_CONTEXT(int control, Hash context);
```

## Parameters

- `control` (`int`)
- `context` (`Hash`)

## Returns

`void`

## Description

Sets the current control context. Must be called every frame.

context: https://alloc8or.re/rdr3/doc/misc/input_contexts.txt
For more information, see common:/data/control/settings.meta
https://github.com/femga/rdr3_discoveries/tree/master/Controls

## Usage

### Lua

```lua
SetControlContext(control, context)

-- always available, by hash
Citizen.InvokeNative(0x2804658EB7D8A50B, control, context)
```

### JavaScript

```js
SetControlContext(control, context);

// by hash
Citizen.invokeNative('0x2804658EB7D8A50B', control, context);
```

### C#

```csharp
Function.Call((Hash)0x2804658EB7D8A50B, control, context);
```

- 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` ``.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB.*
