CMD: Trailer [Not facing the right way]
#2

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:
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);
}
Reply


Messages In This Thread
CMD: Trailer [Not facing the right way] - by DerickClark - 11.07.2018, 17:55
Re: CMD: Trailer [Not facing the right way] - by Caessius - 11.07.2018, 17:59
Re: CMD: Trailer [Not facing the right way] - by DerickClark - 11.07.2018, 18:00
Re: CMD: Trailer [Not facing the right way] - by Caessius - 11.07.2018, 18:01
Re: CMD: Trailer [Not facing the right way] - by DerickClark - 11.07.2018, 18:14
Re: CMD: Trailer [Not facing the right way] - by Caessius - 11.07.2018, 18:17
Re: CMD: Trailer [Not facing the right way] - by DerickClark - 11.07.2018, 18:20
Re: CMD: Trailer [Not facing the right way] - by ItsRobinson - 11.07.2018, 19:02

Forum Jump:


Users browsing this thread: 3 Guest(s)