View Single Post
  #1  
Old 07-20-2008, 06:22 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Unhappy [health script help] <read

ok when i press s to punch it turns my char invis but only if they have this script
and the punch script works fine allso
but this only happens if they have this script
so whats the prob with the script

PHP Code:
//#CLIENTSIDE
function onCreated(){

setTimer(.05);
}
function 
onTimeout(){
hideimgs(0,200);
  for (
i=0this.hps.size(); i++) {
    
showtext(i,this.hps[i][1],this.hps[i][2],"Arial","cb",this.hps[i][0]);
    if (
this.hps[i][0] < 0changeimgcolors(i,1,0,0,1);
     else 
changeimgcolors(i,0,1,0,1);
    
changeimgzoom(i,.8);
    
this.hps[i][2]-=.1;
    
this.hps[i][3]--;
    if (
this.hps[i][3] == 0) {
      
this.hps.delete(i);
    }
  }
  
  if (
client.hp clientr.hpmaxclient.hp clientr.hpmax;
  if (
player.hearts 0this.dead 1;
  if (
this.dead) {
    if (
player.hearts != 0) {
      
this.dead 0;
      
client.hp clientr.hpmax;
      
player.hearts 3;
    }
  }else if (
client.hp <= 0) {
    
player.hearts 0;
    
this.dead 1;
  }else if (
player.fullhearts == 20) {
    if (
player.hearts != 3) {
      
this.php = (player.hearts 3) * 2;
      
client.hp += int(this.php);
      
player.hearts 3;
      
this.hps.add({this.php,player.x+1.5,player.y-1,80});
    }
  }else 
serverwarp("login1");
  
  
setTimer(.05);
}
function 
onPlayerenters(){
this.hps NULL;

Reply With Quote