View Issue Details

IDProjectCategoryView StatusLast Update
0002045Multi Theft Auto : San AndreasScriptingpublic2007-05-17 08:27
Reportererorr404Assigned ToJax 
Status resolvedResolutionfixed 
Product Versionblue_sa.r2.a12 
Target VersionFixed in Versionmtasadm_v1.0-dp1 
Summary0002045: getCursorPosition returns wrong values

This function should return the same worldXYZ values as the onClientCursorMove event, but the values are off (especially worldZ). In the attached screenshot you can see that the functions report different values when the cursor is in the same position.

Additional Information

from resource 'cursorposition':

local root = getRootElement()

addEventHandler("onClientCursorMove", root, "onClientCursorMove")
function onClientCursorMove(cursorX, cursorY, absoluteX, absoluteY, worldX, worldY, worldZ)
outputChatBox("onClientCursorMove world: " .. worldX .. " " .. worldY .. " " .. worldZ)
local cursorX2, cursorY2, worldX2, worldY2, worldZ2 = getCursorPosition()
outputChatBox("getCursorPosition world: " .. worldX2 .. " " .. worldY2 .. " " .. worldZ2)

TagsNo tags attached.



2007-05-14 10:07

administrator   ~~0004562

Slightly changed it, was probably casting different data types, needs testing.


2007-05-14 18:06

developer   ~~0004565

It's still off in 0515.


2007-05-17 08:27

administrator   ~~0004571

Didnt take window position into account, they should match up now.

Issue History

Date Modified Username Field Change