View Single Post
  #9  
Old 04-11-2009, 08:40 AM
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
PHP Code:
function onActionDropFlag() { 
  echo(
"Flag got dropped");  //never comes :( -- don't put space in between echo and (
    
this.blueowner = 2; 
    
this.dir = 1; 
    
client.blueowner = 2; 
    
this.level = "ctf.gmap"; // use quotations around strings
    
this.x = 94.5;
    
this.y = 26;  
    
this.blockagain();
    
this.show();
}
function 
onActionMoveFlag() { 
   if (
player.guild == "Red Team") {
    
player.addWeapon("-BlueFlag"); // I thought it was -System/BlueFlag ?
    
this.blueowner = 1;
    
player.client.blueowner = 1;
    
this.hide();
 }
}
function 
onCreated() { 
  
this.setshape(1,32,32); 
  
this.blueowner = 2; 
  
this.dir = 1; 
  
this.setcharani("sch_ctfblueidle",null); 
    
this.blockagain();
    
this.show();
} 

//#CLIENTSIDE
function onPlayerTouchsme() {
triggeraction(this.x + 0.5, this.y + 0.5, "MoveFlag", player.account);
} 
PHP Code:
function onActionServerSide(cmd) { 
  switch (
cmd) { 
    case 
"removeWeapon": {
    
temp.pl = findplayerbycommunityname(params[1]);
      
pl.removeWeapon("-BlueFlag");
      break; 
      case 
"DropFlag":
        (
"BlueFlag").trigger("ActionDropFlag");
      break;
    } 
  } 
} 

//#CLIENTSIDE
function onCreated() {
    
replaceani("walk", "sch_ctfbwalk"); 
    
replaceani("idle", "sch_ctfbidle"); 
  
showtext 0,player.x+1.5,player.y-1.5,arial,bc,Blue Flag!;
  
changeimgzoom 0,0.9;
  
client.bflag = "got";
  
settimer(.05);
}

function 
onPlayerChats() { 
  if (
player.chat == "drop flag") {
    
triggerserver("gui", name, "DropFlag");   
    
replaceani("walk", "walk"); 
    
replaceani("idle", "idle"); 
    
setani("idle", null); 
    
triggerserver("gui", name, "removeWeapon", player.account); 
  } 
}  

function 
onTimeout() {
if (
client.bflag == "got") {
  
showtext 0,player.x+1.5,player.y-1.5,arial,bc,Blue Flag!;
  
changeimgzoom 0,0.9;
    
settimer(.05);
 }
} 
__________________


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