manve1 Posted August 13, 2012 Share Posted August 13, 2012 Hey, i made a simple script of maximizing GUI i got, but when i maximize, it doesn't minimize when i close it or when i press button again, please help me. function maximize() guiSetSize ( gui, ( math.random( 10, 50 ) * 100 ), ( math.random( 10, 50 ) * 100 ), true ) end addEventHandler("onClientGUIClick", button_maximize, maximize) Link to comment
unknooooown Posted August 13, 2012 Share Posted August 13, 2012 Hey, i made a simple script of maximizing GUI i got, but when i maximize, it doesn't minimize when i close it or when i press button again, please help me. function maximize() guiSetSize ( gui, ( math.random( 10, 50 ) * 100 ), ( math.random( 10, 50 ) * 100 ), true ) end addEventHandler("onClientGUIClick", button_maximize, maximize) No really.. This is probably what you are looking for. function maximize() guiSetSize ( gui, 1, 1, true ) end addEventHandler("onClientGUIClick", button_maximize, maximize) Would you mind telling us why you were using math.random() ? Link to comment
manve1 Posted August 13, 2012 Author Share Posted August 13, 2012 No really.. This is probably what you are looking for. function maximize() guiSetSize ( gui, 1, 1, true ) end addEventHandler("onClientGUIClick", button_maximize, maximize) Thx, it shortened my script, but only one problem, when i press it again, it doesn't make the same size as it was before. or when i close it and open it again, it is still maximized. EDIT: i use math.random cuz it said in wiki Link to comment
manve1 Posted August 13, 2012 Author Share Posted August 13, 2012 I found a way. Thx still for helping. 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