Drop Object Back Of Vehicle
#5

Thanks but it did'nt worked out..
anyone help appreciated!

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        /*if (IsPlayerInAnyVehicle(playerid))
        {
            AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }*/

        new currentveh;
        currentveh = GetPlayerVehicleID(playerid);

        new Float:vehx, Float:vehy, Float:vehz, Float:distance, Float:angle, Float:x2, Float:y2;
        GetVehiclePos(currentveh, vehx, vehy, vehz); //x+0.13 y-5.30 z+0.27
        GetVehicleDistanceFromPoint(currentveh, vehx, vehy, vehz);
        GetVehicleZAngle(currentveh, angle);
        GetXYBehindPoint(vehx, vehy, x2, y2, angle, distance);
        CreateObject(1225,x2,y2,vehz,0.00000000,0.00000000,0.00000000); //object(barrel4) (1)
    }
    return 1;
}
stock GetXYBehindPoint(Float:x,Float:y,&Float:x2,&Float:y2,Float:angle,Float:distance)
{
    x2 = x - (distance * floatsin(-angle,degrees));
    y2 = y - (distance * floatcos(-angle,degrees));
}
Reply


Messages In This Thread
Drop Object Back Of Vehicle - by sameer419 - 21.01.2012, 04:48
Re: Drop Object Back Of Vehicle - by jamesbond007 - 21.01.2012, 05:01
Re: Drop Object Back Of Vehicle - by sameer419 - 21.01.2012, 05:16
Re: Drop Object Back Of Vehicle - by Universal - 21.01.2012, 08:36
Re: Drop Object Back Of Vehicle - by sameer419 - 21.01.2012, 20:47
Re: Drop Object Back Of Vehicle - by [XST]O_x - 21.01.2012, 21:07
Re: Drop Object Back Of Vehicle - by sameer419 - 21.01.2012, 21:26

Forum Jump:


Users browsing this thread: 4 Guest(s)