SA-MP Forums Archive
Stopping car 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: Stopping car exploding (/showthread.php?tid=498380)



Stopping car exploding - George0305 - 03.03.2014

Hey again,i saw on some servers,when you flip your car and it starts burning,it doesn`t explode,just keeps burning.Thanks!


Re: Stopping car exploding - kbalor - 03.03.2014

So you are looking for a script to a car that doesn't explode when it flipped your car? Might be a Auto-Repair/Auto-Fix Script


Here are the links

Car Auto Fix
Auto-Repair

You might also try looking for some fs given above. I saw and there are plenty of them ****** is your friend.


Re: Stopping car exploding - George0305 - 03.03.2014

Those scripts repair the car to 1000,i need it just to keep it burning but not exploding.


Re: Stopping car exploding - MP2 - 03.03.2014

Those won't keep the vehicle on fire though - they will fully repair it.

A vehicle's engine sets on fire when it's health drops below 250. Therefore, in order to keep the fire burning, you can set it to above 250 then below again on a timer. This will reset the explosion. It's still possible for vehicles to explode though, because of network issues (if the connection drops briefly).


Re: Stopping car exploding - kbalor - 03.03.2014

Quote:
Originally Posted by George0305
Посмотреть сообщение
Those scripts repair the car to 1000,i need it just to keep it burning but not exploding.
I know what you mean and this might occur. So just I did said...

"You might also try looking for some fs given above. I saw and there are plenty of them ****** is your friend."

I tried this before in my freeroam server. When you flip your car it flipped and starts burning but it doesn't explode.

EDIT: Okay I was wrong. Follow M2P post


Re: Stopping car exploding - MP2 - 03.03.2014

See my reply.


Re: Stopping car exploding - George0305 - 03.03.2014

Код:
public OnGameModeInit()
{
SetTimer("OnVehicleUpdate", 1000, true);
return 1;
}

forward OnVehicleUpdate();
public OnVehicleUpdate()
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float: vHealth;
GetVehicleHealth(i, vHealth);
if(vHealth < 250)
{
SetVehicleHealth(i, 300.0);
}
}
return 1;
}
Something like this,but it needs to set the health to 500 for example,and then again on 250,but i don`t know how to make this without stopping.


Re: Stopping car exploding - George0305 - 04.03.2014

Anyone?


Re: Stopping car exploding - HK - 04.03.2014

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:h;
    GetVehicleHealth(vehicleid,h);
    if(h < 500)
    {
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,-1,-1,-1,-1,-1,-1);
    }
    return 1;
}



Re: Stopping car exploding - George0305 - 04.03.2014

Quote:
Originally Posted by HK
Посмотреть сообщение
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:h;
    GetVehicleHealth(vehicleid,h);
    if(h < 500)
    {
        SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,-1,-1,-1,-1,-1,-1);
    }
    return 1;
}
Working,thanks!