View Single Post
  #1  
Old 11-29-2009, 05:00 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
Clientside Switch

PHP Code:
//#CLIENTSIDE
function onCreated() {
}
function 
onPlayerChats() {
  if (
player.chat.starts("/")) {
    
temp.toks player.chat.tokenize();
    
temp.com player.chat.substring(1temp.toks[0].length());
    echo(
temp.com);
    switch (@
temp.com) {
      case 
"global"
        
player.chat "TELL IT ALL!";
      break;
    }
  }
  else {
    
// Local Chat
  
}
}
function 
onTimeout() {
}
/* CONFIGURATION */
public function config() {
  
// Font
  
this.msgfont "Comic Sans MS";
  
// Message Time
  
this.msgtime 5;
}
/* CONFIGURATION */ 
Am I stupid or is switch() not working for a reason?
__________________
Stan.
Reply With Quote