View Single Post
  #3  
Old 09-13-2011, 03:32 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
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 
__________________
Reply With Quote