Quote:
Originally Posted by cbk1994
What's actually happening is that the script is being run on every player's computer since it's in a GANI script. The problem is that you can't access other players' clientr variables. You should put the health into another player.attr[] and use that instead of a clientr variable in the GANI.
Also, you don't need a timeout in your GANI. Try showing on onPlayerEnters and onCreated, and just set img.attachToOwner = true.
|
Like this?
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(clientr.player.stats.curhp < 1) {
hideimg(802);
}
}
SCRIPTEND