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



Hunger System - seanny - 08.09.2011

Hello, I want a Hunger System, I aint using the Script Request thread because I need it Fast, And This Hunger System, Should BE Pmed to me in [pawn [.pawn] (Excluding the dot)

Let me Explain: When the player hunger Status goes to 0 then they slowly Lose Health and if they eat something then it goes up higher
Food Like:
Pizza
Burgers and et cetra make it go up slowly

And Food Like:
Salads
Pasta and Et Cetra make it go up Faster


Re: Hunger System - judothijs - 08.09.2011

Simply use timers.
If the timer runs out, they'll die.
If they eat something, just kill the existing timer and set a new one, with more time.

This is just a simple but should-be working example

Don't expect us to give you all-done scripts.
That way, you won't learn anything from it.

Just try it yourself, and post here if you've got any problems


Re: Hunger System - Snipa - 09.09.2011

Think how many timers would have to be set tho

That'll use some resources.. GetTickCount perhaps? Never used it b4 tho..


Re: Hunger System - Kingunit - 09.09.2011

Click here!

It's still a Script Request - So you need to place it there like all other people. Fast or not, it's still a script request.


Re: Hunger System - Bu$ter - 09.09.2011

Well you should use search, i found 2 systems for ya with it which you can use or get some "inspiration" making ur own system

https://sampforum.blast.hk/showthread.php?tid=138670
https://sampforum.blast.hk/showthread.php?tid=50189