K4stic Posted December 21, 2013 Share Posted December 21, 2013 -- Gui sizes = 266, 450 function closePanel() local x, y = guiGetSize ( window, false ) if ( y - 15 ) > 0 then guiSetSize( window, x, y - 15, false ) else guiSetSize( window, x, 0, false) guiSetVisible ( window, false) removeEventHandler ( "onClientPreRender", root, closePanel ) end end function openPanelPrepair() addEventHandler( "onClientPreRender", root, openPanel ) end That stuck at 4th line don't know why [ No eny Errors in Debugscript 3 ] Link to comment
DNL291 Posted December 21, 2013 Share Posted December 21, 2013 Try this: -- Gui sizes = 266, 450 function closePanel() local wX, wY = guiGetSize ( window, false ) local y = wY - 15 if (y > 0) then guiSetSize( window, wX, y, false ) else guiSetSize( window, wX, 0, false) guiSetVisible ( window, false) removeEventHandler ( "onClientPreRender", root, closePanel ) end end function openPanelPrepair() addEventHandler( "onClientPreRender", root, openPanel ) end Link to comment
Castillo Posted December 21, 2013 Share Posted December 21, 2013 What is the problem? Link to comment
K4stic Posted December 21, 2013 Author Share Posted December 21, 2013 i want it to resize gui to 0 and them close but it's only close without any resize 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