Hello,
I'm trying to make a health bar show up when you have a certain amount of health and change sizes above your head according to the amount of health you have.
Currently, showing the image above the players head works and shows for everyone supprisingly (it's placed in a gani and triggered with a weapon).
Though the issue I have is, the image part changes locally.. I really need it to show for everybody because it would be useless if it couldn't.
Here is the weapon I currently have:
PHP Code:
//#CLIENTSIDE
function onCreated() onTimeOut();
function onTimeOut() {
if (player.ani == "hurt") {
player.attr[11] = "e_hp.gani";
}else{
player.attr[11] = null;
}
setTimer(.05);
}
Here is the Gani I currently have:
PHP Code:
SCRIPT
//#CLIENTSIDE
function onCreated() onTimeOut();
function onTimeOut() {
showimg(802,"hp_bar.png",player.x-1.5,player.y-1);
changeimgpart(802,0,0,clientr.player.stats.curhp*102/clientr.player.stats.maxhp,18);
findimg(802).zoom = .5;
if(clientr.player.stats.curhp < 1) {
hideimg(802);
}
setTimer(.05);
}
SCRIPTEND
Thanks in advance,
-Ohk4y