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



Getting HP - (_AcE_) - 08.03.2014

How would I get the hp of my team? I am making a textdraw to display the hp of the team.

I was thinking to get the team hp at the beginning of the match I can just get the teamcount and * 200 to get the full hp + armour count but after someone starts losing hp or armor on a team I have no clue on how to count this..

Do I need to calculate and subtract it or is there a way I can just get all the players on the team hp count every few seconds and keep updating the textdraw?


Re: Getting HP - DanRellex - 08.03.2014

This should help: https://sampwiki.blast.hk/wiki/GetPlayerHealth


AW: Getting HP - Nero_3D - 08.03.2014

Just loop through all players in the team and add up the armour and hp


Re: AW: Getting HP - (_AcE_) - 08.03.2014

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Just loop through all players in the team and add up the armour and hp
After I posted this I just figured it out. Use the i and get hp yeah, thanks I had a brain fart, I realized how to do it after I posted the topic. Thanks anyway :P