View Single Post
  #3  
Old 05-21-2009, 11:17 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You can't reference other player's clientr flags on the clientside.

You are better off doing the following:

PHP Code:

function onActionServerSide() {
  if (
params[0] == "add"){
    
this.clan clientr.clan;
    
temp.pl findplayerbycommunityname(params[1]);
    if (
pl != NULL){
      
pl.clientr.clan.add(this.clan);
      
pl.clientr.position.add("0");
      
pl.clientr.position ="Recruit";
      
pl.clientr.clan ="Forbidden Gladiators";
      
pl.addweapon("Public/Struggler/ClanTag");
      
pl.chat "You have been added to clan: "@this.clan;
    } else{
      
player.chat "Cannot find player!";
    }
  }
  else if (
params[0] == "promote") {
    
temp.pl =  findplayerbycommunityname(params[1]);
    if (
pl != NULL) {
      
// Adjust their rank here.
    
}
  }
  else if (
params[0] == "demote") {
    
temp.pl =  findplayerbycommunityname(params[1]);
    if (
pl != NULL) {
      
// Adjust their rank here.
    
}
  }
}

//#CLIENTSIDE
function onPlayerChats(){
  if (
player.chat.starts("/addmember")){
    
triggerserver("gui",this.name,"add",player.chat.substring(11));
  }
  if (
player.chat.starts("/promote")){
    
// Removed all the If Logic..
    
triggerserver("gui",this.name,"promote",player.chat.substring(9));
  }
  if (
player.chat.starts("/demote")){
    
triggerserver("gui",this.name,"demote",player.chat.substring(8));
  }

__________________
Quote:
Reply With Quote