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



Vehicle damage - JaydenJason - 27.12.2014

Im trying to make a broken engine thingy, like GTA4, that if vehicle health is under 600, the engine breaks down and it takes several seconds to turn his engine on, and if the vehicle health is under 400 the engine can't go on, but all I want to know is how to get it, because I tried it with OnPlayerUpdate but it does not work the way I want it to.


Re: Vehicle damage - HY - 27.12.2014

OnPlayerVehicleDamage(playerid, vehicleid, Float: Damage)

Download include and make under public:

pawn Код:
if(Damage < 600)
{
    // Function
    return 1;
}



Re: Vehicle damage - JaydenJason - 27.12.2014

Quote:
Originally Posted by HY
Посмотреть сообщение
OnPlayerVehicleDamage(playerid, vehicleid, Float: Damage)

Download include and make under public:

pawn Код:
if(Damage < 600)
{
    // Function
    return 1;
}
Thank you so much!