View Single Post
  #3  
Old 01-13-2010, 09:32 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You should be creating the GUI, then just toggling it's visibility like so:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
showGUI();
}

function 
showGUI() {
  
// Check if the Window has been made.
  
if (isObject("Test")) {
    
// Toggle Visibility
    
Test.visible = !Test.visible;
    
// Exit Script
    
return;
  }
  
// Create GUI
  
new GuiWindowCtrl("Test") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "320,240";

    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Window 1";
    
666;
    
351;
  }
  
// Sets Focus to Graal
  
GraalControl.makefirstresponder(true);

__________________
Quote:
Reply With Quote