View Single Post
  #18  
Old 08-11-2011, 08:54 PM
Adddeeee Adddeeee is offline
Registered User
Join Date: Aug 2011
Posts: 30
Adddeeee is on a distinguished road
Hm...it works part time.

The player.chat works, but the GUI doesn't update.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiControlProfile(ATextProfile
  {
    
fontcolor "0 0 0";
    
fonttype "Arial";
    
fontsize 25;
    
fontstyle "b";
  }
    
  new 
GuiProgressCtrl("HealthControl_Bar"
  {
    
profile GuiBlueProgressProfile;
    
width 360;
    
height 40;
    
screenwidth width 20;
    
10;
    
progress player.hearts/player.fullhearts;
    
    new 
GuiTextCtrl("HealthConrol_Text"
    {
      
profile ATextProfile;
      
HealthControl_Bar.width this.width 2;
      
10;
      
height 20;
      
width 80;
      
text player.hearts SPC "/" SPC player.fullhearts;
    } 
  }
}

function 
onPlayerHurt()
{
  
player.chat "HURT";
  
HealthControl_Bar player.hearts/player.fullhearts;
  
HealthControl_Text.text player.hearts SPC "/" SPC player.fullhearts;

Reply With Quote