View Single Post
  #5  
Old 09-13-2011, 04:41 AM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Quote:
Originally Posted by cbk1994 View Post
You have a period at the end of the attachToOwner instead of a semicolon, and you didn't change the clientr. variable near the hideImg. You also need to use a separate attr index for the maximum health value.
PHP Code:
SCRIPT

//#CLIENTSIDE
function onPlayerEnters() {
  
showimg(802,"hp_bar.png",player.x-1.5,player.y-1);
  
changeimgpart(802,0,0,player.attr[28]*102/player.attr[28],18);
  
findimg(802).zoom .5;
  
findimg(802).attachToOwner true;
    if(
player.attr[28] < 1) {
      
hideimg(802);
    }
}

SCRIPTEND 
player.attr[28] changes online
__________________
Reply With Quote