11.07.2018, 17:59
You should save the facing Z angle. Save the value of GetVehicleZAngle and set that value again using SetVehicleZAngle.
So basically, you code will become:
So basically, you code will become:
pawn Код:
stock SaveTrailers(trailerID)
{
new
sz_Entry[128],
File: fileHandle = fopen("trailers.txt", io_append),
Float:tmpCoords[4];
new trailerModel = GetVehicleModel(trailerID);
GetVehiclePos(trailerID, tmpCoords[0], tmpCoords[1], tmpCoords[2]);
GetVehicleZAngle(trailerID, tmpCoords[3]);
format(sz_Entry, sizeof(sz_Entry), "Trailer - CreateVehicle(%d, %f, %f, %f, %f, 0, -1, -1, 6000000);", trailerModel, tmpCoords[0], tmpCoords[1], tmpCoords[2], tmpCoords[3]);
fwrite(fileHandle, sz_Entry);
return fclose(fileHandle);
}