Giving players health, - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Giving players health, (
/showthread.php?tid=419244)
Giving players health, -
California_ - 28.02.2013
Hey Im not no noob. I know how to give health but I want to give players +Health like for example
pawn Код:
SetPlayerHealth(playerid,+10);
But that does not work. Can anyone show me how to do this?
Re: Giving players health, -
2KY - 28.02.2013
Get their health using GetPlayerHealth:
pawn Код:
new Float: Health;
GetPlayerHealth ( playerid, Health );
Then increase it like so using SetPlayerHealth:
pawn Код:
SetPlayerHealth ( playerid, Health + 10.0 );