Jump to content

Need help


manve1

Recommended Posts

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
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

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 xD

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...