Lloyd Logan Posted January 13, 2013 Share Posted January 13, 2013 How do i make it so that when F6 is pressed again the GUI disappears? bindKey("F6", "down", function ( ) guiSetVisible( wnd, true ) guiSetVisible( bHealth, true ) guiSetVisible( bDie, true ) showCursor( true ) end ) Link to comment
DNL291 Posted January 13, 2013 Share Posted January 13, 2013 bindKey("F6", "down", function ( ) guiSetVisible( wnd, not guiGetVisible(wnd) ) guiSetVisible( bHealth, not guiGetVisible(bHealth) ) guiSetVisible( bDie, not guiGetVisible(bDie) ) showCursor( guiGetVisible(wnd) ) end ) Link to comment
Castillo Posted January 13, 2013 Share Posted January 13, 2013 bindKey ("F6", "down", function ( ) local state = guiGetVisible ( wnd ) guiSetVisible ( wnd, not state ) guiSetVisible ( bHealth, not state ) guiSetVisible ( bDie, not state ) showCursor ( not state ) end ) Link to comment
Lloyd Logan Posted January 13, 2013 Author Share Posted January 13, 2013 Thanks Guys! Link to comment
Lloyd Logan Posted January 13, 2013 Author Share Posted January 13, 2013 bindKey ("F6", "down", function ( ) local state = guiGetVisible ( wnd ) guiSetVisible ( wnd, not state ) guiSetVisible ( bHealth, not state ) guiSetVisible ( bDie, not state ) showCursor ( not state ) end ) Not working? bindKey("F6", "down", function ( ) guiSetVisible( wnd, true ) guiSetVisible( bHealth, true ) guiSetVisible( bDie, true ) showCursor( true ) end ) bindKey ("F6", "down", function ( ) local state = guiGetVisible ( wnd ) guiSetVisible ( wnd, not state ) guiSetVisible ( bHealth, not state ) guiSetVisible ( bDie, not state ) showCursor ( not state ) end ) Link to comment
Castillo Posted January 13, 2013 Share Posted January 13, 2013 You must only use the second one. Link to comment
Lloyd Logan Posted January 13, 2013 Author Share Posted January 13, 2013 You must only use the second one. Thank You! 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