This script provides functionality for towing vehicles using a trailer in FiveM.
This function spawns a trailer and sets up the necessary interactions.
To create a trailer, use the following export in your script:
exports.snowy_trailer:CreateTrailer(position)
position
: A vector4 or table containing the x, y, z, w coordinates where the trailer should be spawned.- returns the trailer entity.
To enable debugging, set Debug
to true
in configs/client.lua
.
The following distance settings are available in configs/client.lua
:
SecondaryRamp
: Distance from the rope where the vehicle stops when towed to the top.MainRamp
: Distance from the rope where the vehicle stops when towed to the bottom.