RedM Natives

_SET_CONTROL_CONTEXT

Sets the current control context.

Hash0x2804658EB7D8A50B
Runtime nameSetControlContext
NamespacePAD
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _SET_CONTROL_CONTEXT(int control, Hash context);

Parameters

NameTypeDescription
controlint—
contextHash—

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
SetControlContext(control, context)

-- always works, by hash
Citizen.InvokeNative(0x2804658EB7D8A50B, control, context)
JavaScript and C#
JavaScript
SetControlContext(control, context);

// by hash
Citizen.invokeNative('0x2804658EB7D8A50B', control, context);
C#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.