View Single Post
  #9  
Old 03-11-2011, 04:27 AM
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
I would try using a variable other than "this.hearts" it may be getting messed around with by the engine.

Try this:

PHP Code:
//#CLIENTSIDE

function drawHearts() {
  if (
clientr.maxhearts != this.lastmaxhearts) {
    
hideimgs(11001230);
    for (
temp.0temp.clientr.maxheartstemp.i++) {
      
with (findimg(1100 temp.i)) {
        
64 110 18 temp.1;
        
12;
        
layer 5;
        
image "sorna_hud_heart_background.png";
      }
    }
    
this.lastmaxhearts clientr.maxhearts;
    
updateHearts(true);
  } else {
    
updateHearts();
  } 
}

function 
updateHearts(force) {
  if (
clientr.hearts != this.lasthearts || force) {
    
hideimgs(12001230);
    for (
temp.0temp.clientr.heartstemp.i++) {
      if ((
temp.i+1) > clientr.hearts) {
        
temp.heartpart temp.1;
      } else {
        
temp.heartpart 0;
      }
      
with (findimg(1200 temp.i)) {
        
64 110 18 temp.1;
        
12;
        
layer 6;
        switch (
temp.heartpart) {
          case    
0image "sorna_hud_heart.png"; break;
          case 
0.25image "sorna_hud_heart_quarter.png"; break;
          case 
0.50image "sorna_hud_heart_half.png"; break;
          case 
0.75image "sorna_hud_heart_threequarters.png"; break;
        }
      }
    }
    
this.lasthearts clientr.hearts;
  }  

__________________
Quote:

Last edited by fowlplay4; 03-11-2011 at 04:37 AM..
Reply With Quote