Jump to content

Help Urgent, Script Error!!


FlyingSpoon

Recommended Posts

I don't know what's wrong but this should work,

function openClose() 
  
regOn = guiCreateWindow(236, 410, 351, 110, "Register at our website!", false) 
guiWindowSetSizable(regOn, false) 
regNote = guiCreateLabel(15, 25, 317, 61, "Sorry, our server is currently under construction, however\nyou can apply online,\n\n[url=http://www.SoonAvailable.com]http://www.SoonAvailable.com[/url]", false, regOn) 
closeMe = guiCreateButton(300, 80, 42, 20, "Close", false, regOn) 
  
if bRegister then 
guiSetVisible( regOne, true) 
else 
if closeMe then 
guiSetVisible( regOne, false) 
     end 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), openClose) 
  

When I click on the 'Register' button, that GUI appears however once I click 'Close' it don't go away?

Why is this, I am sure it should work.

Link to comment
function openClose() 
  
regOn = guiCreateWindow(236, 410, 351, 110, "Register at our website!", false) 
guiWindowSetSizable(regOn, false) 
regNote = guiCreateLabel(15, 25, 317, 61, "Sorry, our server is currently under construction, however\nyou can apply online,\n\n[url=http://www.SoonAvailable.com]http://www.SoonAvailable.com[/url]", false, regOn) 
closeMe = guiCreateButton(300, 80, 42, 20, "Close", false, regOn) 
  
if bRegister then 
guiSetVisible( regOne, true) 
else 
if closeMe then 
guiSetVisible( regOne, false) 
     end 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), openClose) 
  

use if source == bRegister and elseif source == closeMe.

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