2021-02-01, 05:27 PM
What happens after you type /wreck? Does it show any messages in chat?
Also, there's no call for the function AttachTrailerToVehicle. The command /wreck just destroys the vehicle.
You can try changing this part:
SetVehiclePos(closestcar, 0, 0, 0); // Attempted desync fix
DestroyVehicle(closestcar);
With this:
AttachTrailerToVehicle(carid , closestcar);
Also, there's no call for the function AttachTrailerToVehicle. The command /wreck just destroys the vehicle.
You can try changing this part:
SetVehiclePos(closestcar, 0, 0, 0); // Attempted desync fix
DestroyVehicle(closestcar);
With this:
AttachTrailerToVehicle(carid , closestcar);