SA-MP Forums Archive
Food - 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: Food (/showthread.php?tid=271973)



Food - Pasa - 26.07.2011

Hello i am making a food script with the command /eat
then a dialog apearse witch food i will, an now i downt know how to like command GivePlayerMoney how i can make like GivePlayerHealt (because there is setplayer health but that is not so real for my script)

Please help


Re: Food - antonio112 - 26.07.2011

Well, you'll have to do it with SetPlayerHealth function. Something like:
pawn Код:
new Float:pHealth;
GetPlayerHealth(playerid, pHealth);
SetPlayerHealth(playerid, pHealth + 30);
Something like that.


Re: Food - Pasa - 26.07.2011

i will try this


Re: Food - Rafa - 26.07.2011

or u need to make timer to update ur health one every 3 or 4 secount for 15 health