Lloyd Logan Posted January 13, 2013 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 )
DNL291 Posted January 13, 2013 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 )
Castillo Posted January 13, 2013 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 )
Lloyd Logan Posted January 13, 2013 Author 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 )
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 You must only use the second one. Thank You!
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