View Single Post
  #1  
Old 09-13-2011, 03:21 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
Help with image part and gani.

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
__________________
Reply With Quote