07-02-2011, 17:04
I'm trying to change players hp induvidually depending on what team they are on using this code.
It prints the name correctly by different clients so I know it gets run as player but it refuses to change the maxhp. Is there something else that needs to be changed to get it to work?
PHP Code:
sethp(hp)
{
self.maxhealth = hp;
self.health = self.maxhealth;
self iPrintLn(self.name+" maxhealth: "+self.maxhealth+ "hp:"+hp);
}
It prints the name correctly by different clients so I know it gets run as player but it refuses to change the maxhp. Is there something else that needs to be changed to get it to work?