ControlsClient

getControlUnboundNormal

GET_CONTROL_UNBOUND_NORMAL0x5B84D09CEC5209C5

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

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

Usage

JavaScript
const value = getControlUnboundNormal(control, action);
Lua
local value = getControlUnboundNormal(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.

Seems to return values between -1 and 1 for controls like gas and steering.

Reference

Namespace
Controls PAD
In the game
float GET_CONTROL_UNBOUND_NORMAL(int control, int action)
Hash
0x5B84D09CEC5209C5

Open in the interactive natives reference