14.10.2011, 02:41
sу uma duvida, tem como explodir na direзгo que o carro estб indo ao invйs da float X + 25 (por exemplo) ?
stock GetXYInFrontOfVehicle(vehicleid, &Float:x, &Float:y, Float:distance)
{//Thanks for who made this function.
new Float:a;
GetVehiclePos(vehicleid, x, y, a);
GetVehicleZAngle(vehicleid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
CMD:explodir(playerid, params[])
{
new Float:explosion[3],Float:pos[2],vehicleid=GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid, pos[0], pos[1], explosion[2]);
GetXYInFrontOfVehicle(vehicleid,explosion[0],explosion[1],25.0);
CreateExplosion(explosion[0], explosion[1], explosion[2], 2, 10.0);
return 1;
}