Ryder! Posted April 25, 2009 Share Posted April 25, 2009 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
50p Posted April 26, 2009 Share Posted April 26, 2009 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
Ryder! Posted April 26, 2009 Author Share Posted April 26, 2009 i have no other resource running, i did "stopall" then start "mygamemode" Link to comment
Gamesnert Posted April 26, 2009 Share Posted April 26, 2009 Maybe guiSetInputEnabled is set to true? Try setting it to false. Last time I checked it it showed the cursor, and showCursor didn't affect it. Link to comment
Ryder! Posted April 26, 2009 Author Share Posted April 26, 2009 omg i love you ! it worked fine without guiSetInputEnable. So much time wasted finding out what it was I hope they fix this in next nighlty. Thanks Link to comment
Gamesnert Posted April 26, 2009 Share Posted April 26, 2009 I'm unsure if it's intended, but in my opinion it should indeed not show the mouse. What else is showCursor() for then anyway? 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