SA-MP Forums Archive
how destroy a vehicle when hit health 1%? - 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 destroy a vehicle when hit health 1%? (/showthread.php?tid=526388)



how destroy a vehicle when hit health 1%? - UserName31 - 17.07.2014

hey i dont want vehicle exploding in my server how can i make them get destroy when it hit a ammount in health like 1% then car will get destroy? +rep


Re: how destroy a vehicle when hit health 1%? - Jack_Leslie - 17.07.2014

Reference: https://sampwiki.blast.hk/wiki/GetVehicleHealth

Quote:
Originally Posted by SA-MP Wiki
Tip: A vehicle catches on fire when its health is below 250. It will explode a few seconds later.



Re: how destroy a vehicle when hit health 1%? - UserName31 - 17.07.2014

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
thanks man +rep


Re: how destroy a vehicle when hit health 1%? - MrWupiazZzLT - 17.07.2014

Better should be

Код:
public OnVehicleDeath(vehicleid, killerid)
{
DestroyVehicle(vehicleid);
return 1;
}