Thread: Gui Timeout
View Single Post
  #5  
Old 07-21-2006, 01:52 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Put all the gui script in one part, but have the timeout somewhere else.

Example

PHP Code:
function onCreated()
  {
  
LoadGui();
  
onTimeout();
}

function 
LoadGui()
  {
  new 
GuiWindowCtrl("Gui_Window") {
    
destroyonhide false;
    
profile "GuiRedTransWindowProfile";
    
profile.transparency .5;
    
width 70;
    
height 60;
    
10;
    
10;
    
active true;
    
visible true;
    
canresize false;
    
canmaximize false;
    
canminimize false;
    
canmove false;
    
text "GUI";
    
    new 
GuiTextCtrl("GuiText") {
      
10;
      
23;
      
width 124;
      
height 20;
      
useownprofile true;
      
profile.fontcolor = {1,1,1};
    }
  }
}

function 
onTimeout()
  {
  
GuiText.setText("MP: "@player.mp);
  
setTimer(0.1);

__________________



Reply With Quote