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;
    
x = screenwidth - 342;
    
y = screenheight - 216;

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

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

function 
CarChat_Menu.onSelect(entryid, text)
{
  switch (
entryid)
  {
    case 
"1":
    {
      
triggerserver("gui", name, "kickout", this.selectednode);
      break;
    }
  }
} 
Reply With Quote