Cursor.position

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Client-Side
Function

Js.png JavaScript



Get X & Y coordinates of cursor.

Syntax

mp.gui.cursor.position

Parameters

  • X: Int
  • Y: Int

Examples

This send in chat X & Y coordinates of cursor.

Client-Side
mp.events.add('render', () => {
    mp.gui.chat.push(`X: ${mp.gui.cursor.position[0]}`);
    mp.gui.chat.push(`Y: ${mp.gui.cursor.position[1]}`);
});

See Also