Thread: Chat functions
View Single Post
  #5  
Old 06-01-2007, 04:07 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by cbkbud View Post
So all it is is a frame for a trigger? You could just do:

PHP Code:
function onActionServerSidecmdtokens )
{
  switch ( 
cmd )
  {
    case 
"test":
    {
       
// FOO
       
break;
    }
  }
}
//#CLIENTSIDE
function onPlayerChats()
{
  if ( ! 
player.chat.starts"/" ) )
  {
    return 
false;
  }
  
tokens player.chat.tokenize();
  
triggerServer"gui"nametokens );

He COULD have done that, or he could have provided his example, which provides a more hands on experience for the learning scripter. With his example, someone can go OH THATS WHY YOU WOULD DO THAT, whereas with yours, someone might miss the reason entirely.

There was really nothing wrong with what he proposed, and it seems like everytime I come to the scripting forum, every thread leads into an argument to boast/destroy e-pride. Play nice k?
__________________
Reply With Quote