SET_CONTROL_VALUE_NEXT_FRAME
This is for simulating player input.
Hash
0xE8A25867FBA3B05ERuntime name
SetControlValueNextFrameNamespacePAD
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xE8A25867FBA3B05ESignature
BOOL SET_CONTROL_VALUE_NEXT_FRAME(int control, Hash action, float value);Parameters
| Name | Type | Description |
|---|---|---|
control | int | — |
action | Hash | — |
value | float | — |
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
local retval = SetControlValueNextFrame(control, action, value)
-- always works, by hash
local retval = Citizen.InvokeNative(0xE8A25867FBA3B05E, control, action, value, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = SetControlValueNextFrame(control, action, value);
// by hash
const retval = Citizen.invokeNative('0xE8A25867FBA3B05E', control, action, value + 0.0000001, Citizen.returnResultAnyway());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.InvokeNativeneeds the number — passjoaat("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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.