[FREE][STANDALONE] Towing script

The server this was built for was a 64 slot server, therefore using Onesync, when we tested it everything seemed to work fine, I don’t know if that’s also true for servers that have more than 64 slots.

Looking great, is it possible for other players do detach my attached vehicle?

Haven’t thought about that, I’ll play a little with the script tomorrow and I’ll update it if I get it working properly.

Awesome stuff!

1 Like

QUICK UPDATE

  • Added a check to see if the vehicle is attached to anything before trying to detach it.
  • Added notifications for the /detach command.
  • Borrowed QBCore’s GetClosestVehicle() function (clearly all credits go to them for it) as it finds trailers besides all the other vehicles.
2 Likes

Good, I don’t know if you thought that the ramp is not that ramp and is the one that was created for the [Release] Flatbed w/ working bed it is very good but it has a I failed that when you hit the block on the ramp the vehicle crashes the script but I think that with the descent of Tampa that your script has more would look much better, sorry for the plate, it is a personal opinion that I have and thanks for the script It works very well

1 Like

There seems to be a problem when using the command deployramp that deletes the truck FLATBED

hmm, odd, could you tell me how it happened? Did you restart the script before deploying the ramp on the truck, or did it just do it the first time you tried the command, can you think of a way to reproduce the bug?

When I write the command, this problem occurs, however, I did not do anything, I just downloaded and installed it only, and when I choose the truck FLATBED and type the command deployramp, it may delete the truck and it appears as in the picture above

3 Likes

Just made it back home, should’ve fixed the bug, feel free to download the updated version of the script from the repository.

1 Like

Is there any possibility to use addon vehicles?

Sure, at the top of the client file there’s a list of whitelisted vehicles, just add the addon vehicle you want to use in there.
Besides whitelisting it, you want to play with the offset to make the ramp be at the position you want it.

I understand. What happens is that I have been trying to add a custom flatbed, but it does not allow to deploy the ramp or attach any vehicles to it. I tried adding a “sultan” to the whitelist and that one worked perfectly. However, I have tried with several addon vehicles but none of them are really allowed to use the functions.

Alright, I’ll give it a look and I’ll let you know.

Forget it, it was my mistake. I was putting the name of the addon vehicles in upper case following the examples you posted, but for the addons, the name should be in lower case. Everything worked perfectly!

Good to hear, I’ll update the script with the addition of a config file, for easier configuration and with the actual fix for the other bug reported above as I actually forgot to fully do the fix I wanted, I got lost in details, had a few stressful days lately.

Don’t worry. I still dare to say that your script is the best I’ve seen on the subject of towing. The others that have been available are either extremely complex, expensive or don’t work at all.

1 Like

Another quick update:

  • Added a check for the vehicle’s rotation (mainly for it’s pitch), so that it can be attached with the correct pitch (X - axis) to flatbeds/ramp trucks like the one in the picture below.

(You can download this specific ramp truck here: Vapid Sadler - Ramp Truck [Add-On | Liveries] - GTA5-Mods.com, all credits for the ramp truck go to its creators, also this is being used on my localhost for testing purposes and not on a public server)

2 Likes

Sorry, couldn’t resist

  • Added a yaw check, picture will explain for me.


In case it’s not clear, now the vehicles get attached to the flatbed with the proper yaw (Z - axis rotation).

1 Like

Which menu are you using , and if possible could you share it , not familiar how to make it myself.