Thread: Startup GUI?
View Single Post
  #2  
Old 05-12-2010, 01:35 AM
iSlayer iSlayer is offline
Snk for manager
iSlayer's Avatar
Join Date: Feb 2010
Location: Room 7, Era Hotel, Era
Posts: 202
iSlayer will become famous soon enough
Actually I found this

PHP Code:
function onActionServerSidecmd 

  if ( 
cmd == "getMessage" 
  { 
    
temp.n.loadLines"control/serverNews.txt" ); 
    
temp.h.loadLines"control/serverHirings.txt" ); 
    
temp.s.loadLines"control/serverStaff.txt" ); 
    
temp.i.loadLines"control/serverInfo.txt" ); 
    
triggerclient"gui"name"returnMessage"temp.ntemp.htemp.stemp.); 
  } 

//#CLIENTSIDE 
function onCreated() 

  
triggerserver"gui"name"getMessage" ); 

function 
onActionClientSidecmdnhs

  if ( 
cmd == "returnMessage" 
  { 
    for ( 
temp.
    { 
      
temp.ne @= temp."\n"
    } 
     
    for ( 
temp.
    { 
      
temp.hi @= temp."\n"
    } 
     
    for ( 
temp.
    { 
      
temp.st @= temp."\n"
    } 
     
    for ( 
temp.
    { 
      
temp.inf @= temp."\n"
    } 
     
    
showMessagetemp.netemp.hitemp.sttemp.inf ); 
  } 

function 
showMessagenewshiringsstaffinfo 

  new 
GuiWindowCtrl"LoginMessage_Window" 
  { 
    
profile "GuiBlueWindowProfile"
     
    
width 440
    
height 368
     
    
screenwidth - ( width ); 
    
screenheight - ( height ); 
     
    
canMaximize canResize false
    
canClose canMinimize visible title true
     
    
text "Welcome to" SPC servername "!"
     
    new 
GuiScrollCtrl"LoginMessage_NewsScroll" 
    { 
      
profile "GuiBlueScrollProfile"
       
      
15
      
54
       
      
width 410
      
height 300
       
      
vScrollBar "dynamic"
      
hScrollBar "alwaysOff"
       
      
visible false
       
      new 
GuiMLTextCtrl"LoginMessage_NewsText" 
      { 
        
profile "GuiBlueTextProfile"
         
        
3
        
0
         
        
width 390
        
height 300
         
        
text news
      } 
    } 
     
    new 
GuiScrollCtrl"LoginMessage_HiringsScroll" 
    { 
      
profile "GuiBlueScrollProfile"
       
      
15
      
54
       
      
width 410
      
height 300
       
      
vScrollBar "dynamic"
      
hScrollBar "alwaysOff"
       
      
visible false
       
      new 
GuiMLTextCtrl"LoginMessage_HiringsText" 
      { 
        
profile "GuiBlueTextProfile"
         
        
3
        
0
         
        
width 390
        
height 300
         
        
text hirings
      } 
    } 
     
    new 
GuiScrollCtrl"LoginMessage_StaffScroll" 
    { 
      
profile "GuiBlueScrollProfile"
       
      
15
      
54
       
      
width 410
      
height 300
       
      
vScrollBar "dynamic"
      
hScrollBar "alwaysOff"
       
      
visible false
       
      new 
GuiMLTextCtrl"LoginMessage_StaffText" 
      { 
        
profile "GuiBlueTextProfile"
         
        
3
        
0
         
        
width 390
        
height 300
         
        
text staff
      } 
    } 
     
    new 
GuiScrollCtrl"LoginMessage_InfoScroll" 
    { 
      
profile "GuiBlueScrollProfile"
       
      
15
      
54
       
      
width 410
      
height 300
       
      
vScrollBar "dynamic"
      
hScrollBar "alwaysOff"
       
      
visible false
       
      new 
GuiMLTextCtrl"LoginMessage_InfoText" 
      { 
        
profile "GuiBlueTextProfile"
         
        
3
        
0
         
        
width 390
        
height 300
         
        
text info
      } 
    } 
    new 
GuiTabCtrl"LoginMessage_Tab" 
    { 
      
profile "GuiBlueTabProfile"
       
      
35
      
30
       
      
width 450
      
height 24
       
      
tabwidth 90
       
      
clearRows(); 
       
      
temp.= { 
                 { 
"News""LoginMessage_NewsScroll" }, 
                 { 
"Hirings""LoginMessage_HiringsScroll" }, 
                 { 
"Staff""LoginMessage_StaffScroll" }, 
                 { 
"Info""LoginMessage_InfoScroll" 
               }; 
       
      for ( 
temp.temp.
      { 
        
with addRow0temp.a[0] ) ) 
        { 
          
this.iPane temp.a[1]; 
        } 
      } 
      
thiso.catcheventname"onSelect""onTabSelected" ); 
      
setSelectedRow); 
    } 
  } 

function 
onTabSelectedtabs 

  for ( 
temp.tabs.rows 
  { 
    if ( 
temp.== tabs.selected 
    { 
      ( @ 
temp.t.iPane[0] ).visible true
    } 
    else 
    { 
      ( @ 
temp.t.iPane[0] ).visible false
    } 
  } 

Then if I give (npcserver)
r control/*.txt

And uploaded the TXT files, added as an NPC to my server would it work?
__________________
Snk for manager




Quote:
Originally Posted by Admins View Post
Snk for manager of Era
Reply With Quote