GetCursorPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
==Syntax==  
{{Client function}}
__NOTOC__
This function gets the current position of the mouse cursor.
 
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
int int float float float getCursorPosition ( void )
int int float float float getCursorPosition ( )
</syntaxhighlight>
</syntaxhighlight>
cursorX, cursorY, worldX, worldY, worldZ
 
===Required Arguments===
''None''
 
===Returns===
Returns 5 values: cursorX, cursorY, worldX, worldY, worldZ. The first two values are the 2D screen coordinates of the cursor in pixels, relative to the upper left corner. The 3 values that follow are the 3D world map coordinates that the cursor points at.
 
==Example==

Revision as of 15:15, 20 August 2007

This function gets the current position of the mouse cursor.

Syntax

int int float float float getCursorPosition ( )

Required Arguments

None

Returns

Returns 5 values: cursorX, cursorY, worldX, worldY, worldZ. The first two values are the 2D screen coordinates of the cursor in pixels, relative to the upper left corner. The 3 values that follow are the 3D world map coordinates that the cursor points at.

Example