ControlsClient

getControlHowLongAgo

GET_CONTROL_HOW_LONG_AGO0xD7D22F5592AED8BA

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

SignatureJavaScript
getControlHowLongAgo(control: number): number
SignatureLua
getControlHowLongAgo(control: integer): integer

Usage

JavaScript
const result = getControlHowLongAgo(control);
Lua
local result = getControlHowLongAgo(control)

Parameters

ParameterTypeJavaScriptLuaDescription
controlintnumberintegersee isControlEnabled

Returns

int JavaScript number, Lua integer

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 the time elapsed since LS:MP took the input.

Notes

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

Returns time in ms since last input.

Reference

Namespace
Controls PAD
In the game
int GET_CONTROL_HOW_LONG_AGO(int control)
Hash
0xD7D22F5592AED8BA
Formerly
_GET_MS_SINCE_LAST_INPUT

Open in the interactive natives reference