getControlValue
GET_CONTROL_VALUE0xD95E79E8686D2C27The GTA V native GET_CONTROL_VALUE of the PAD namespace, as LS:MP client scripts call it: the global function getControlValue, in JavaScript and in Lua.
getControlValue(control: number, action: number): numbergetControlValue(control: integer, action: integer): integerUsage
JavaScript
const result = getControlValue(control, action);Lua
local result = getControlValue(control, action)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
control | int | number | integer | see isControlEnabled |
action | int | number | integer |
Returns
int JavaScript number, Lua integerOn LS:MP
ℹ
Input while LS:MP has the focus
While the LS:MP menu, the console or a focused browser holds the keyboard and mouse, this native does not reach the game: it returns 127, the value of a control at rest.
Reference
- Namespace
- Controls PAD
- In the game
int GET_CONTROL_VALUE(int control, int action)- Hash
0xD95E79E8686D2C27