View Single Post
  #6  
Old 05-26-2008, 03:47 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
PHP Code:
//#CLIENTSIDE 
function onPlayerChats() 
{ 
  
temp.fontSize = TradeChatList.profile.fontsize; 
  
temp.fontType = TradeChatList.profile.fonttype; 
  
temp.fontWidth = getTextWidth(temp.fontSize, temp.fontType, NULL, player.chat); 
  if(
temp.fontWidth>5850) 
  { 
    
TradeChatListText.text @= "<br>Your chat message is too long, please make it shorter."; 
    
player.chat = ""; 
  } else { 
    
TradeChatListText.text @= "<br>" @ player.account @ ": " @ player.chat; 
    
player.chat = ""; 
  } 
  
sleep(0.01); 
  
TradeChatList.scrolltoBottom(); 
} 

function 
onCreated() 
{ 
  new 
GuiScrollCtrl("TradeChatList") 
  { 
    
profile = GuiBlueScrollProfile; 
    
profile.border = 4; 
    
position = { 6 , 233 }; 
    
width = 330; 
    
height = 60; 
    
hScrollBar = "dynamic"; 
    
vScrollBar = "alwaysOn"; 
    new 
GuiMLTextCtrl("TradeChatListText") 
    { 
      
profile = GuiBlueMLTextProfile; 
      
position = { 4 , 0 }; 
      
width = 300; 
      
height = 10; 
      
text = "Trade Initialized with players: " @ player.account @ " and " @ client.TradePlayer @ "."; 
    } 
  } 
} 
It will go up.. then in 0.01 seconds, go down because of scrolltoBottom().
Reply With Quote