- Documentation
- Client functions
- getCursorPositionAbsolute
Function
getCursorPositionAbsolute
Returns the cursor position in screen pixels (while the cursor is shown).
Syntax
float, float getCursorPositionAbsolute()Returns
x and y in pixels or false.
Example
addEventHandler("onClientRender", root, function()
local x, y = getCursorPositionAbsolute()
if x then dxDrawRectangle(x - 2, y - 2, 4, 4, tocolor(255, 122, 34)) end
end)