10.08.2014, 10:20
How can I make that vehicle will be thrown in air and then it will fall down.. I tried to raise vehicle's Z coordinate but vehicle is stuck in air..
stock ThrowVehicle(vehicleid, Float: height)
{
new Float: x, Float: y, Float: z;
GetVehicleVelocity(vehicleid, x, y, z);
SetVehicleVelocity(vehicleid, x, y, z+height);
return 1;
}
for(new a = 1; a < MAX_VEHICLES - 1; a++)
{
if (!GetVehiclePos(a, pX, pY, pZ)) continue; // vehicle does not exist
if(BombOnVehicle[a] == 1)
{
ThrowVehicle(a, 3);
BombOnVehicle[a] = 0;
PlantedBomb[playerid] = 0;
CreateExplosion(pX, pY, pZ, 4, 5.0);
CreateExplosion(pX, pY, pZ, 5, 5.0);
CreateExplosion(pX, pY, pZ, 6, 5.0);
break;
}
}