I am having some trouble getting healing to work if you have a vest. I have it do a loop trying to max out the vest and health but it only heals a little bit of your health and vest per running.
Here is the code: (vesthp is 100 if the players vest is > 0, otherwise it is 0)
repeat
if getplayerstat(ID,'health') < 150 then dodamage(ID,-2);
if getplayerstat(ID,'health') > 150 then dodamage(ID,2);
if getplayerstat(ID,'vest') < vesthp then dodamage(ID,-1);
until (getplayerstat(ID,'health') = 150) AND (getplayerstat(ID,'vest') = vesthp);
I dont get why this isnt working. What is the % of the damage done to the vest and the health when damage is done? Why isnt this working?
Thank You.