getControlNormal
GET_CONTROL_NORMAL0xEC3C9B8D5327B563The GTA V native GET_CONTROL_NORMAL of the PAD namespace, as LS:MP client scripts call it: the global function getControlNormal, in JavaScript and in Lua.
getControlNormal(control: number, action: number): numbergetControlNormal(control: integer, action: integer): numberUsage
JavaScript
const value = getControlNormal(control, action);Lua
local value = getControlNormal(control, action)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
control | int | number | integer | see isControlEnabled |
action | int | number | integer |
Returns
float JavaScript number, Lua numberOn 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 0.0, or 0.5, the centre of the screen, for the two cursor axes.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns the value of getControlValue normalized (i.e. a real number value between -1 and 1)
Reference
- Namespace
- Controls PAD
- In the game
float GET_CONTROL_NORMAL(int control, int action)- Hash
0xEC3C9B8D5327B563