Delaying a explosion
#10

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
If I understand you correctly, you should set a 1 second timer which repeats 35 times to set the vehicle's health to 250 (fire) and after the 35th repetition, it explodes. An example:

pawn Код:
forward public VehicleFireExplode(vehicleID, burnTime);

public VehicleFireExplode(vehicleID, burnTime)
{
    if(burnTime)
    {
        SetVehicleHealth(vehicleID, 250);
        SetTimerEx("VehicleFireExplode", 1000, 0, "ii", vehicleID, burnTime - 1);
    }
    else
    {
        new Float: vehiclesPosition[3];
        GetVehiclePos(vehicleID, vehiclesPosition[0], vehiclesPosition[1], vehiclesPosition[2]);
        CreateExplosion(vehiclesPosition[0], vehiclesPosition[1], vehiclesPosition[2], 6, 10);
    }

    return 1;
}

SetTimerEx("VehicleFireExplode", 1000, 0, "ii", GetPlayerVehicleID(playerid), 35);
That's some pretty smart scripting stuff you got there...
Reply


Messages In This Thread
Delaying a explosion - by JacobWilkerson - 12.08.2013, 00:33
Re: Delaying a explosion - by verlaj - 12.08.2013, 01:53
Re : Delaying a explosion - by JacobWilkerson - 12.08.2013, 02:09
Re : Delaying a explosion - by JacobWilkerson - 12.08.2013, 10:43
Re : Delaying a explosion - by JacobWilkerson - 13.08.2013, 20:47
Re: Delaying a explosion - by Vanter - 13.08.2013, 20:55
Re: Delaying a explosion - by Smokeyy - 13.08.2013, 21:00
Re: Delaying a explosion - by MaDK1LLA - 13.08.2013, 21:04
Re: Delaying a explosion - by SuperViper - 13.08.2013, 21:06
Re: Delaying a explosion - by DoubleOG - 13.08.2013, 21:08

Forum Jump:


Users browsing this thread: 1 Guest(s)