setCursorPosition
SET_CURSOR_POSITION0xFC695459D4D0E219The GTA V native SET_CURSOR_POSITION of the PAD namespace, as LS:MP client scripts call it: the global function setCursorPosition, in JavaScript and in Lua.
setCursorPosition(x: number, y: number): booleansetCursorPosition(x: number, y: number): booleanUsage
JavaScript
const result = setCursorPosition(x, y);Lua
local result = setCursorPosition(x, y)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
Returns
BOOL JavaScript boolean, Lua booleanOn 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 false.
Reference
- Namespace
- Controls PAD
- In the game
BOOL SET_CURSOR_POSITION(float x, float y)- Hash
0xFC695459D4D0E219- Formerly
_SET_CURSOR_LOCATION