01.05.2014, 11:33
You need the z (height) and that can be found by GetVehiclePos function. I added + 1 to the current height just to prevent it to be underground. If it's over the ground though, you can remove it.
You don't need the rotations of the vehicle.
pawn Код:
GetXYZInFrontOfVehicle(vehicleid, &Float:x, &Float:y, &Float:z, Float:distance)
{
new Float:a;
GetVehiclePos(playerid, x, y, z);
GetVehicleZAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
z += 1.0;
}