[RELEASE][FREE] Car Towing System | Standalone

ZeroDream Towing

Vehicle towing system for FiveM

Features

  • Towing cars
  • Network synchronized ropes
  • Custom rope connection bone of the vehicle
  • Controllable rope length
  • No framework require

Installation

  1. Clone or download this repo: kasuganosoras/zerodream_towing
  2. Copy the zerodream_towing folder to your server resources folder
  3. Add start zerodream_towing to your server.cfg
  4. Restart the server

How to use

By default, you can use the command /tow to tow your cars.

The car should have a attach_female bone, if not it will say ‘Not allowed to tow’.

You can change the bone name in config.lua, I suggest using chassis or neon_b for the tow car bone.

  1. Close to the first car and type command /tow
  2. Go to the second car and type it again
  3. Now your cars should be connected
  4. Using Page Up / Page Down to control the rope length (Keys can be changed in config)
  5. Type the command /tow again to disconnect the cars

If you want to integrate it into your scripts, please read the API documentation below.

API

SetTowVehicle: Use this function to set the towing car, you have to call it two times to set the first and second vehicle.

local vehicleA = GetVehiclePedIsIn(GetPlayerPed(-1), false)
local vehicleB = GetVehiclePedIsIn(GetPlayerPed(2), false) 
exports["zerodream_towing"]:SetTowVehicle(vehicleA) 
exports["zerodream_towing"]:SetTowVehicle(vehicleB)

FreeTowing: This function will detach the cars immediately.

if IsControlJustPressed(0, 51) then
    exports["zerodream_towing"]:FreeTowing()
end

Credits

Change log

1.0.1 (2022.08.22) - Fixed rope length network sync issue
1.0.0 (2022.08.21) - First release

Enjoy it! :hugs:

13 Likes

bro nice work bro

thank youu

Thank you for the share :smiley:.

1 Like

any preview ?

standalone ?

change the notify in client…

Oops, I forget to change the notification, because I’m using bulletin for notification on my server.
I uploaded the new code to GitHub now.

Nice work!

after i execute the tow command, the rope shows and yet the car cant move

Maybe the second car handbrake is holding, you should tell another player to sit on the second car and press the ‘W’, then the handbrake will release until the player leave the car.

When I try used , I got this message “This vehicle is not allowed to tow” . Ando I try with too many vehicles … any help?

same here

The car should have a attach_female bone, you can change it in config.lua to another name like chassis or neon_b.

It looks like a copy of [STANDALONE] Realistic Vehicle winch

Similar features, but not the same.
All the code was written by me.

what is the resmon at idle and use

Hello, I changed the attach_female to ‘chassis’ and it is still giving this error.

someone solved?