[Tutorial] How to make an anti-teamkill -Easy- (with OPSP)
#6

Quote:
Originally Posted by wouter0100
View Post
pawn Code:
SetPlayerHealth( Target, HealthLost);
(here you set his health to healthlost, if he lost 5 heal, his heal setted to 5.)
need to be
pawn Code:
SetPlayerHealth( Target, (GetPlayerHealth(Target) + HealthLost));
(Get his healt + the healthlost = his health before attack)
Which is still wrong:
pawn Code:
new Float:hp;
GetPlayerHealth(target, hp);
SetPlayerHealth(target, hp + healthlost);
Add capitals wherever necessary.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)