Jump to content

Weird problem with cursor


Ryder!

Recommended Posts

hi,

First, we call to a "login/register" gui and we show the cursor when client resource start. Then the user input their account and password and it's sent to the server, if everything is correct then they are logged in and we call to a client event that show their characters in a gridlist, so when they select one character and press a "select" button they are spawned and the cursor should hide but it not.

  
function selectCharacter() 
    local row, column = guiGridListGetSelectedItem ( acp_grd ) 
    if row ~= -1 and column ~= -1 then 
        destroyElement( ped ) 
        destroyElement( acp_wnd ) 
        removeEventHandler( "onClientRender", getRootElement(), rotatePed ) 
        showCursor( false ) 
        outputDebugString( tostring( isCursorShowing() ) ) 
        --triggerServerEvent( "onClientSelectChar", getRootElement(), nick ) 
    end 
end 
  

I get no errors and isCursorShowing() output "false" since the cursor is still there....

Link to comment

Maybe some other script used showCursor(). I'm not 100% sure but when you use showCursor( true ) in one script then you have to use showCursor( false ) in the same script to hide it, if you won't hide from within the same resource it will not disappear. So that when you use showCursor( true ) in one script then show cursor again from another script, the cursor will not be hidden until both scripts call showCursor( false ).

(I remember it was meant to be implemented in 1.0, so if you're on nightlies then you should consider that)

Link to comment

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...