getControlHowLongAgo
GET_CONTROL_HOW_LONG_AGO0xD7D22F5592AED8BAThe 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.
getControlHowLongAgo(control: number): numbergetControlHowLongAgo(control: integer): integerUsage
JavaScript
const result = getControlHowLongAgo(control);Lua
local result = getControlHowLongAgo(control)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
control | int | number | integer | see isControlEnabled |
Returns
int JavaScript number, Lua integerOn 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