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



Cars Exploding - Krakuski - 15.12.2012

Hi everyone, Happy Saturday! I just wanted to figure out how to make it so when your car totals, it wont explode, but stay at a vehicle health that will make it unusable, so that I can get my mechanic job into use when they /mech.

Thank you in Advance ~ Krakuski


Re: Cars Exploding - park4bmx - 15.12.2012

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:health;
    GetVehicleHealth(vehicleid, health);
    if(health<320)
        {
             SetVehicleHealth(vehicleid, 350);//so it doesn't explode
             //To turn the engine off use my custom function(if you want)
             VehicleEngine(vehicleid,true)
        }
    return 1;
}
you can find the function here:
http://forum.sa-mp.com/showpost.php?...44&postcount=2

But its with a random timer for a realistic start!