View Single Post
  #13  
Old 04-02-2007, 09:11 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by killerogue View Post
What Chandler posted is most likely to help you, but I took about 5-6 minutes to make this

PHP Code:
// This will require the player follows this format:
// "/box 1". <- Too change the box number.

//#CLIENTSIDE
function onPlayerChats()
{

  if(
player.chat.starts("/box")) //C hecks if the player chat starts with this
  
{

    
tokens player.chat.tokenize(); //S plits the player chat into tokens
    
if(tokens[1] == 1// If this is true
    
{
      
message(1); // Changes the message to this
    
}
    else if (
tokens[1] == 2// If the above is not true and this is true
    
{
      
message(2); // Changes the message to this
    
}
  }
}

function 
onPlayerChats()
{

  if(
player.chat == "/reset"//Checks if this is the players chat
  
{
    
message(NULL); //If the above is true does this
  
}

PHP Code:
message(NULL); // NULL isn't a string...
message(""); // That'll work. "" is a string. Null won't work here. 
__________________
What signature? I see no signature?
Reply With Quote