ControlsClient

enableControlAction

ENABLE_CONTROL_ACTION0x351220255D64C155

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

SignatureJavaScript
enableControlAction(
  control: number,
  action: number,
  enableRelatedActions: boolean
): void
SignatureLua
enableControlAction(
  control: integer,
  action: integer,
  enableRelatedActions: boolean
)

Usage

JavaScript
enableControlAction(control, action, enableRelatedActions);
Lua
enableControlAction(control, action, enableRelatedActions)

Parameters

ParameterTypeJavaScriptLuaDescription
controlintnumberintegersee isControlEnabled
actionintnumberinteger
enableRelatedActionsBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

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 does nothing.

Reference

Namespace
Controls PAD
In the game
void ENABLE_CONTROL_ACTION(int control, int action, BOOL enableRelatedActions)
Hash
0x351220255D64C155

Open in the interactive natives reference