[Ajuda] carro/explosгo
#3

pawn Код:
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;
}
25.0 й a distвncia entre o veнculo e a explosгo. Se vocк deixar muito prуximo, caso o veнculo esteja muito rбpido irб colidir com a explosгo!
Reply


Messages In This Thread
[Ajuda] carro/explosгo - by Cristhian - 14.10.2011, 02:41
Re: [Ajuda] carro/explosгo - by iansinho - 14.10.2011, 09:57
Re: [Ajuda] carro/explosгo - by Shelby - 14.10.2011, 12:00
Re: [Ajuda] carro/explosгo - by Cristhian - 14.10.2011, 14:58

Forum Jump:


Users browsing this thread: 1 Guest(s)