ControlsClient

setControlValueNextFrame

SET_CONTROL_VALUE_NEXT_FRAME0xE8A25867FBA3B05E

The GTA V native SET_CONTROL_VALUE_NEXT_FRAME of the PAD namespace, as LS:MP client scripts call it: the global function setControlValueNextFrame, in JavaScript and in Lua.

SignatureJavaScript
setControlValueNextFrame(
  control: number,
  action: number,
  value: number
): boolean
SignatureLua
setControlValueNextFrame(
  control: integer,
  action: integer,
  value: number
): boolean

Usage

JavaScript
const result = setControlValueNextFrame(control, action, value);
Lua
local result = setControlValueNextFrame(control, action, value)

Parameters

ParameterTypeJavaScriptLuaDescription
controlintnumberintegersee isControlEnabled
actionintnumberinteger
valuefloatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

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

Reference

Namespace
Controls PAD
In the game
BOOL SET_CONTROL_VALUE_NEXT_FRAME(int control, int action, float value)
Hash
0xE8A25867FBA3B05E
Formerly
_SET_CONTROL_NORMAL

Open in the interactive natives reference