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



Health - Micko123 - 18.05.2016

Hey guys. I want to make TD for showing car's health. I have for speed but i need health. Any ideas how to make this??
And is there any tut on this


Re: Health - Sjn - 18.05.2016

Alright, here are some tips:

First, create a textdraw with any textdraw editor available. Then set up the created textdraw in your script, write the showing and hiding functions for that textdraw wherever you show or hide them.

Inside a timer function which is obviously a speedometer function, fetch the vehicle health and format a string to display the health there, then set the formatted string to the textdraw that you've created.

If you want to use a progress bar, a good vehicle health example is already included in this progressbar thread: https://sampforum.blast.hk/showthread.php?tid=113443


Re: Health - Micko123 - 18.05.2016

Thank you Very usefull