View Single Post
  #1  
Old 03-03-2008, 12:16 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Message System [middle of screen]

Here's a message system, simply trigger the client to add a message.


Message Data = {"Message Type: [Guildmessage [green], normal [white]]", "Message Here", "Either Nickname or Account Name"}

PHP Code:
//#CLIENTSIDE
function onActionClientSide()
{
  
this.drawMessage( {params[2] @ ":" SPC params[1], "bc", (params[0] == "Guildmessage"? {010}: {111}) } );
}

function 
drawMessage(stuff)
{  
  
client.cMessages.insert(0temp.stuff);
  if (
client.cMessages.size() >= 5)
  {
    
client.cMessages.delete(5);
  }

  
this.updateMessages();
}

function 
updateMessages()
{
  for (
temp.iclient.cMessages)
  {
    
temp.o++;
    
temp.width textwidth(0.6"Tahoma"temp.i[1], temp.i[0]);
  
    
showtext(300 temp.o, (screenwidth 2) + (temp.width 2), (screenheight 16) - (temp.16), "Tahoma"temp.i[1], temp.i[0]);
    
changeimgvis(300 temp.o4);
    
changeimgzoom(300 temp.o0.6);
    
changeimgcolors(300 temp.otemp.i[2][0], temp.i[2][1], temp.i[2][2], 1);
    
    
this.("mode_" temp.o) = temp.i[2];
    
this.("fade_" temp.o) = 1;
  }
  
  if (
temp.!= null)
  {
    
scheduleevent( (temp.15) + 3"Fade""");      
  }   
}
  
function 
onFade()
{
  
temp.client.cMessages.size();
    
  
this.("fade_" temp.i) -= 0.005;
  
  if (
this.("fade_" temp.i) <= 0)
  {
    
client.cMessages.delete(temp.1);
    
this.updateMessages();
    
    return 
false;
  }
  
  
temp.this.("mode_" temp.i);
  
changeimgcolors(300 temp.itemp.g[0], temp.g[1], temp.g[2], this.("fade_" temp.i));
     
  
scheduleevent(0.05"Fade""");

__________________
Reply With Quote