Quote:
Originally Posted by Swedky
PHP код:
new Float:fX, Float:fY, Float:fZ, Float:angle;
GetVehiclePos(vehicleid, fX, fY, fZ);
GetVehicleZAngle(vehicleid, angle);
SetVehiclePos(vehicle2, fX + (dist * floatsin(-angle, degrees)), fY + (dist + floatcos(-angle, degrees)), fZ);
Change "dist" to the distance where you want to put "vehicle2". Positive values will put it in front, negative will put it in back.
|
Does not work so well.
I am trying to detach the Trailer from truck, but if i only use the Function "DetachTrailerFromVehicle" it not sync sometime with other players. Know how to solve it?
With some tests i came to use teleport trailer from 2 meters of the truck behind it.