isControlHeldDown
_IS_CONTROL_HELD_DOWN0xE9CB8C56E90D5079The GTA V native _IS_CONTROL_HELD_DOWN of the PAD namespace, as LS:MP client scripts call it: the global function isControlHeldDown, in JavaScript and in Lua.
isControlHeldDown(control: number, action: number, duration: number): booleanisControlHeldDown(
control: integer,
action: integer,
duration: integer
): boolean⚠
Not in this game build
The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.
Usage
JavaScript
const result = isControlHeldDown(control, action, duration);Lua
local result = isControlHeldDown(control, action, duration)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
control | int | number | integer |
action | int | number | integer |
duration | int | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanReference
- Namespace
- Controls PAD
- In the game
BOOL _IS_CONTROL_HELD_DOWN(int control, int action, int duration)- Hash
0xE9CB8C56E90D5079- Introduced
- Game build 3407 legacy numbering