ControlsClient

isControlEnabled

IS_CONTROL_ENABLED0x1CEA6BFDF248E5D9

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

SignatureJavaScript
isControlEnabled(control: number, action: number): boolean
SignatureLua
isControlEnabled(control: integer, action: integer): boolean

Usage

JavaScript
const result = isControlEnabled(control, action);
Lua
local result = isControlEnabled(control, action)

Parameters

ParameterTypeJavaScriptLua
controlintnumberinteger
actionintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

control: 0: PLAYER_CONTROL, 1: CAMERA_CONTROL, 2: FRONTEND_CONTROL
For more info, see https://docs.fivem.net/docs/game-references/controls/

Reference

Namespace
Controls PAD
In the game
BOOL IS_CONTROL_ENABLED(int control, int action)
Hash
0x1CEA6BFDF248E5D9

Open in the interactive natives reference