View Single Post
  #3  
Old 09-19-2006, 04:37 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
This is the Chat calling. - In a timeout if that means anything -
PHP Code:
  if (clientr.icar || client.car)
  {
    if (
CarChat_Window0 == NULL)
    {
      
triggerserver("gui"name"chat""join"player.account);
      
onShowChat();
    }
  } 
Heres the function / gui controls

PHP Code:
function onShowChat()

  new 
GuiWindowCtrl(CarChat_Window0)
  {
    
canclose false;
    
canresize false;
    
canminimize false;
    
canmaximize false;
    
height 216;
    
profile "GuiBlueWindowProfile";
    
text "Car Chatroom";
    
width 342;
    
screenwidth 342;
    
screenheight 216;

    new 
GuiScrollCtrl(CarChat_Scroll0)
    {
      
height 161;
      
hscrollbar "alwaysOff";
      
profile "GuiBlueScrollProfile";
      
vscrollbar "dynamic";
      
width 227;
      
6;
      
24;
      
      new 
GuiMLTextCtrl(CarChat_MultiLine0)
      {
        
profile "GuiBlueMLTextProfile";
        
text "Welcome to the Car Chatroom!";
        
width 210;
        
wordwrap true;
        
3;
        
3;
      }
    }
    
    new 
GuiScrollCtrl(CarChat_Scroll1)
    {
      
height 161;
      
hscrollbar "dynamic";
      
profile "GuiBlueScrollProfile";
      
vscrollbar "dynamic";
      
width 103;
      
233;
      
24;
      
      new 
GuiTextListCtrl(CarChat_TextList0)
      {
        
height 32;
        
profile "GuiBlueTextListProfile";
        
width 80;
        
0;
        
0;
      }
    }
    
    new 
GuiTextEditCtrl(CarChat_TextEdit0)
    {
      
height 25;
      
historysize 255;
      
profile "GuiBlueTextEditProfile";
      
visible true;
      
width 330;
      
6;
      
185;
    }
    
    new 
GuiContextMenuCtrl(CarChat_Menu)
    {
      
profile "GuiBluePopUpMenuProfile";
      
textprofile "GuiBlueTextListProfile";
      
width 20;
    }
  }
}

function 
CarChat_TextList0.onOpenMenu(nodepathnamedotname)
{
  if (
pathname != player.account && !clientr.icar)
  {
    
CarChat_Menu.clearRows();
    
CarChat_Menu.addRow(0pathname);
    
CarChat_Menu.addRow(1"Remove Player");
    
this.selectednode pathname;
    
CarChat_Menu.open(mousescreenxmousescreeny);
  }
}

function 
CarChat_Menu.onSelect(entryidtext)
{
  switch (
entryid)
  {
    case 
"1":
    {
      
triggerserver("gui"name"kickout"this.selectednode);
      break;
    }
  }

Reply With Quote