Thread: Tag Adder Thing
View Single Post
  #3  
Old 03-09-2008, 08:39 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
You aren't declaring "tokens," you're just doing "player.chat.tokenize()" and Gscript2 doesn't work like that.
Comparing things should be done using "==" instead of "=" because "=" is used for declaration.
(Sorry, just used editor to style it because I didn't feel like uploading on a server.)
PHP Code:
//Made by Ork
//Released to the public on 3/9/08
function onActionServerSidecmd, var, var2 ){
  switch( 
cmd ) {
    case 
"tag":
    if (
clientr.iset == false ){
      
player.chat "I'm not an ET!";
      return;
    }else{
      
player.nick clientr.ettag;
      
player.chat "Tag on!";
      break;
      case 
"hire":
      if (
player.account == "emeraldwhelpling") {
        
temp.pl findplayer( var );
        if ( 
temp.pl.level.length() > ) {
          
temp.pl.clientr.iset true;
          
temp.pl.clientr.ettag var2;
          
temp.pl.chat "I was added to the Events Team by "@player.account@"";
          
player.chat "I've added "@temp.pl.account@" to the Events Team!";
          break;
          case 
"fire":
          if (
player.account "emeraldwhelpling") {
            
temp.pl findplayer( var );
            if ( 
temp.pl.level.length() > ) {
              
temp.pl.guild temp.pl.clientr.ettag "";
              
temp.pl.clientr.iset false;
              
temp.pl.chat "I was fired from ET by "@player.account@"!";
              
player.chat "I've removed "@temp.pl.account@" from the Events Team!";
              
            }
          }
        }
      }
    }
  }
}
//#CLIENTSIDE
function onKeyPressedcodekey ) {
  if ( 
key == ) {
    
triggerserver("gui",name,"tag");
  }
}
function 
onPlayerChats() {
  
temp.tokens player.chat.tokenize();
  if ( 
tokens[0] == "/hire" ) {
    
triggerserver"weapon"name"hire"tokens[1], tokens[2] );
  }
  if ( 
tokens[0] == "/fire" ) {
    
triggerserver"weapon"name"fire"tokens[1] ) ;
  }

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote