Player Health problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player Health problem (
/showthread.php?tid=120512)
Player Health problem -
Naruto4 - 11.01.2010
Код:
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
i want to add 50 hp on his Health.
but this will set his HP to 50. tried several times.
thx
Re: Player Health problem -
Naruto4 - 11.01.2010
bump
Re: Player Health problem -
Naruto4 - 12.01.2010
can anyone help ?
Re: Player Health problem -
[HiC]TheKiller - 12.01.2010
That should work

.
Re: Player Health problem -
Naruto4 - 12.01.2010
but it doesnt.
Re: Player Health problem -
Naruto4 - 12.01.2010
Up. C'mon i couldnt be that none knows...
Re: Player Health problem -
saiberfun - 12.01.2010
http://forum.sa-mp.com/index.php?topic=67900.0
also that should work i guess
Re: Player Health problem -
RyDeR` - 12.01.2010
Код:
GiveHealth(playerid, Float:Health)
{
new Float: HP;
GetPlayerHealth(playerid, HP);
return SetPlayerHealth(playerid, floatadd(HP, Health);
}
This is the same but try this..
Put this anywhere and use GiveHealth(playerid, 25.0); in ur the cmd or sometin' to give (25.0, you can change..) health.
Re: Player Health problem -
Naruto4 - 13.01.2010
it works Ryder