View Single Post
  #2  
Old 07-11-2012, 09:55 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You can't edit player.hearts on the clientside, you'll need to trigger the server to do so:

PHP Code:
// Recieve the triggeraction, with cmd being the first parameter passed
function onActionServerside(cmd) {
  if (
cmd == "heal") {
    
player.hearts player.fullhearts;
  }
}
//#CLIENTSIDE
function onWeaponFired() {
  if(
clientr.spellevel >= 10) {
    
// Call a trigger to the server
    // "gui" simply tells it that it needs to trigger a gui, which is actually a weapon
    // name simply references the name of the weapon itself, so it's triggering itself
    // "heal" is simply a parameter you're going to pass
    
triggerserver("gui",name,"heal");
    
setani("lift",NULL);
  }

You also need to work on your formatting some so it's easier for us to read.
Reply With Quote