11.07.2018, 17:55
When i use this command and added to the server. then i restart and the trailer not facing where i print it facing.
Код:
CMD:printtrailer(playerid, params[])
{
SaveTrailers(GetPlayerVehicleID(playerid));
SendClientMessageToAll(-1, "Saved this Trailer");
return 1;
}
Код:
stock SaveTrailers(trailerID)
{
new
sz_Entry[128],
File: fileHandle = fopen("trailers.txt", io_append),
Float:tmpCoords[3];
new trailerModel = GetVehicleModel(trailerID);
GetVehiclePos(trailerID, tmpCoords[0], tmpCoords[1], tmpCoords[2]);
format(sz_Entry, sizeof(sz_Entry), "Trailer - CreateVehicle(%d, %f, %f, %f, 0, -1, -1, 6000000);", trailerModel, tmpCoords[0], tmpCoords[1], tmpCoords[2]);
fwrite(fileHandle, sz_Entry);
return fclose(fileHandle);
}


