RedM Natives

SET_CONTROL_VALUE_NEXT_FRAME

This is for simulating player input.

Hash0xE8A25867FBA3B05E
Runtime nameSetControlValueNextFrame
NamespacePAD
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xE8A25867FBA3B05E

Signature

BOOL SET_CONTROL_VALUE_NEXT_FRAME(int control, Hash action, float value);

Parameters

NameTypeDescription
controlint—
actionHash—
valuefloat—

Returns BOOL

Description

This is for simulating player input.
value is a float value from 0 - 1

control: see IS_CONTROL_ENABLED

Old name: _SET_CONTROL_NORMAL

Usage

Lua
local retval = SetControlValueNextFrame(control, action, value)

-- always works, by hash
local retval = Citizen.InvokeNative(0xE8A25867FBA3B05E, control, action, value, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = SetControlValueNextFrame(control, action, value);

// by hash
const retval = Citizen.invokeNative('0xE8A25867FBA3B05E', control, action, value + 0.0000001, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xE8A25867FBA3B05E, control, action, value);
  • 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`.
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

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