MrDadosz Posted July 15, 2015 Share Posted July 15, 2015 I tried example on page (https://wiki.multitheftauto.com/wiki/SetCursorPosition) and this function can't set position for cursor. It's bugged or what? I tested it on 1.5 and 1.4.1. 0 errors, 0 warnings. Link to comment
GTX Posted July 15, 2015 Share Posted July 15, 2015 Check if cursor is actually showing with: isCursorShowing Otherwise, yes, it's probably a bug. Link to comment
MrDadosz Posted July 15, 2015 Author Share Posted July 15, 2015 Yes, I showed the cursor and still not working. Link to comment
iMr.Dawix~# Posted July 15, 2015 Share Posted July 15, 2015 try wiki example code : function centerCursorFunction() local showing = isCursorShowing () if showing then -- if the cursor is showing local screenX, screenY = guiGetScreenSize () --get the screen size in pixels setCursorPosition (screenX/2, screenY/2) --set the cursor position to the center of the screen else outputChatBox( "Your cursor is not showing." ) end end addCommandHandler( "centerCursor", centerCursorFunction ) Link to comment
GTX Posted July 15, 2015 Share Posted July 15, 2015 I did some test and it's true, this function is bugged. https://bugs.multitheftauto.com/view.php?id=8941 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now