Quote:
Originally Posted by cbk1994
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