Jump to content

Does setCursorPosition work?


MrDadosz

Recommended Posts

Posted

Check if cursor is actually showing with:

isCursorShowing 

Otherwise, yes, it's probably a bug.

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted

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 ) 

My E-mails:

" Manners Maketh Man "

" الأخلاق تصنع الرجل "

░░░░░███████ ]▄▄▄▄▄▄▄▄ BooM !

▂▄▅█████████▅▄▃▂

███████████████████].

◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...