SA-MP Forums Archive
How to detect vehicle damage, and get damage taken? - 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: How to detect vehicle damage, and get damage taken? (/showthread.php?tid=455093)



How to detect vehicle damage, and get damage taken? - Micius - 31.07.2013

How to detect vehicle damage, and get damage taken?


Re: How to detect vehicle damage, and get damage taken? - Micius - 31.07.2013

up ?


Re: How to detect vehicle damage, and get damage taken? - dEcooR - 31.07.2013

ill give you an example

Код:
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
printf("Vehicle Status : [Panels] : %d - [Doors] : %d - [Lights] : %d - [Tires] : %d",panels,doors,lights,tires);



Re: How to detect vehicle damage, and get damage taken? - Memoryz - 31.07.2013

Try this: https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate

Store the HP in a global variable, and then everytime the damage is updated, GetVehicleHealth and compare it to see the damage taken.


Re: How to detect vehicle damage, and get damage taken? - Micius - 31.07.2013

Thanks both. +rep