ControlsClient

getControlNormal

GET_CONTROL_NORMAL0xEC3C9B8D5327B563

The 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.

SignatureJavaScript
getControlNormal(control: number, action: number): number
SignatureLua
getControlNormal(control: integer, action: integer): number

Usage

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

Parameters

ParameterTypeJavaScriptLuaDescription
controlintnumberintegersee isControlEnabled
actionintnumberinteger

Returns

float JavaScript number, Lua number

On 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

Open in the interactive natives reference