View Single Post
  #6  
Old 11-29-2009, 05:16 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Solved the problem.

PHP Code:
function onPlayerChats() {
  
temp.toks = null;
  
temp.com = null;
  
  
temp.toks = player.chat.tokenize();
  
temp.com = temp.toks[0].substring(1);

  switch (
temp.com) {
    case 
"global":
      echo(
"boo");
    break;
    
    default:
      echo(
"bark");
    break;
  }
} 
__________________
Stan.
Reply With Quote