Thread: player.hearts
View Single Post
  #4  
Old 07-16-2010, 01:12 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by xAndrewx View Post
I'm trying to update this serverside- but it won't o-o
I'm using a custom GUI, so I'm using this to heal the player

HTML Code:
public function onHealPlayer(amount) {
  player.hearts += temp.amount;
  triggerclient("weapon", "-Player/HUD", "updateHP", player.hearts);
}
Once it's updated, it'll call the HUD to update. However, on the serverside it shows the HP changing without a problem, but when I go on the clientside it's staying at the old value, not the new one!
Anyone have any reasons why?
I tried it with the default system, but no fix x-x (still updated on the serverside, not the clientside)
Hm yeah the player.hearts variable is definately synced and should not require manual update, but assuming the HUD is relying on a trigger to update the display my only guess based on this would be the lack of "player." before triggerclient();.
Reply With Quote