[Release][ESX] erp_towscript - Highly Customisable and top working Vehicle Tow-Script for FiveM

Please add a preview.

1 Like

Preview as i said before is following when i have the time.
Features are pretty obvious, Attach vehicles onto your Flatbed . Via Command/Event , tow vehicle blacklist, job restriction,

If you’re still supporting this resource, it is broken just like others have mentioned. When players join the server, with the configuration file setup correctly, players will always receive the problem of “No vehicles nearby”.

The only way to resolve this it to restart the resource after the player has joined. So during your testing, if you were restarting the resource whilst still in the server, that will be why you never saw the errors.

i tested it all the ways and it always worked. Also its running on other servers and working 100% fine unmodified.

Please check the Repo and load the latest version. I made some changes to the way of raycasting the vehicles. For some who had this problem it got fixxed this way.

I downloaded the latest version available less than a month ago. Either way, I’ve left you with some feedback, what you choose to do with it is up to you.

welp yeah.
Like i told you, it works everytime i try and thats the same for others. If you are not able to download the latest version, which came out a few days ago, i cant help u. :man_shrugging:

Updated to the latest version and still same issue. When players connect and have the mechanic role, they cannot use the command /tow unless the resource gets restarted whilst they are already in the server.

Ok.
I managed to look into it. The “No vehicle nearby” issue was probably a problem with the RayCasting i used, which should get fixxed in the Latest version.

The Problem with the command seems to be ESX job related. I think the problem is, that it checks if your allowed to do the command BEFORE it sets your job properly. I have changed the flow of it a bit in the latest version now. I think i have to find some way to check when the player got spawned properly by esx and then check his job etc.
The only problem is that in my experience not everyone has the event “esx:playerLoaded” (or however its called) after you got spawned. some have it some dont.
“playerSpawned” doesnt work either cause its not related to esx so it doesnt provide that the playerdata is set properly.
I think if i have time, i will add a Server-Side Check to confirm the job.

Works Great! Love it!

Did we find a solution to this?

when i tow a npc car, after few mins it despawns, anyway to stop a car despawning when towing

npc cars arent supposed to be towed.
The despawn has to do with your server / your scripts. If the NPC cars arent consistent /permanent (they spawn / despawn depending on players) thats a problem.

Any Player-Owned vehicle should be spawned by the server , which makes them basicly permanent, thus not being despawned when a player leaves the server/the car’s scope

it should alredy be fixxed for some time now. just check the latest version on github

is there a way to make it so when u tow a npc car it does not despawn when it is on the tow

please read my answer, i told u whats the problem.

I may be able to fix it but as i dont know your setup and am not currently willing to re-work a whole server i cant currently help you any further, cause i have my own server to work on for release, etc.

1 Like

it only despawn when i tow a npc car, once towed less then 30 it will despawns, npc do not normal despawn around the city and work how they meant to

1 Like

I’m late for this, but they already told you, that you aren’t supposed to tow NPC cars.

Where is an preview?

1 Like

paid?

id probably buy it if it had a preview lol