VehicleTransport - Easy attach and detach Vehicles!

This script does not require any framework to function at all.
So yes, it will work with QB, ESX and whatever other frameworks are being used (or none at all). This is completely standalone.

By default, every player can use the features, but there is an enable / disable event, that can be triggered at any time. So e.g. if someone is a mechanic, you can enable the script only for that job. (readme includes everything you need to know; including an ESX example).

As long as you can get the car onto the transport vehicle and you can sit inside it, this will work.
You currently cannot attach a vehicle if you cannot sit inside.
This is a planned thing, I just didn’t have the time to implement it (yet).

Thank you for the response. I’m trying to add addon vehicles to the list but there’s a “ModelHash”. Does that hash have to match the vehicle I’m trying to add or can I just disregard it? IF it does require a specific hash how do I get that type of hash? I’ve only seen 0x80435… type hashes

EDIT: I just read the readme doc for how to add new vehicles. Disregard that question

This script now uses the Asset Escrow System, meaning you can download it from your keymaster website!
There is currently no encryption being used at all!

Small update fixing a minor bug and adding my version checker.

  • Now uses the Escrow encryption for the server sided files. Source code for the DLL’s is still included!
  • Added a version checker. Displays new updates and patch notes in the server console.
  • Fixed an error that could teleport a player into a random vehicle.

Works great! BTW I think this will be more optimized for ESX if you’ll integrate it with qtarget.
I love the script and I am using it on my server now. :slight_smile:

Thanks for the love!

I will rework this eventually to get it on a higher quality level. But I’ll definitely use my own targeting system :stuck_out_tongue:

If you are interested: [Release] ContextMenu - Create a new kind of menu!

hey bro how can i talk to you?

about what?

where is the saved json file to replace the one in the script exactly? i cant find it

If you are creating a custom transport, the data will be written into the server console. You can just copy paste it into the actual file inside the script folder.

There will be an update that makes this process automatic eventually

Update 1.8:

  • Added events for attaching and detaching vehicles that can be used in other scripts (check the readme for more).
  • transportData.json is now automatically updated when creating a new transport. No more copy-pasting necessary; only a script restart.
  • transportData.json is also now backed up once before a new transport is created.
  • Now spawns the ramp on serverside for onesync servers to prevent a bug related to onesync infinity.
  • Fixed the ramp position not being set correctly when creating a new transport.
  • Fixed vehicles not being detected correctly for some client / server version combinations.

Update 1.8.1:

  • Fixed ramp spawning.

Is there optimization updates coming soon? Script is great btw!

image

1 Like

I can definitely see your concerns but it is not actually as bad as it looks.

C# resources have a slight overhead through some background shenanigans. The resource is pretty much as optimized as it gets.
You can actually see it for yourself: If you duplicate the resource and start it with a different name a second time, it will have more like 0.01-0.03ms. The first C# resource is always the one showing this internal overhead.

That being said, I have thought of going full Lua on this. But it is not yet clear if I will do so :slight_smile:
… and thanks for the love! <3

I have problems with the ramp system most time not spawn and when im go under the map see many ramps. i have deleted script download new and same problems.
Someone a solution?

Please check the readme for faster support :wink:

Try this inside the config → onesync = false
Doesn’t seem intuitive, but that’s the best thing I can say for now. Might cause some slight sync issues depending on player count, but better than spamming ramps below the road.

An update is planned soon to hopefully get rid of the problem entirely.

Well, i bought it, but i can spawn / despawn the ramp maxx 2 times, then it wont spawn again.

dude where are the instructions???

@SkyRanger I’m sooo sorry. I must have missed your message. If this is still an issue, please refer to the first paragraph of the included readme!

@ProdByTbaby Did you check under the table?
Joke aside, read the readme.
If whatever you are looking for is not included in there, specify your question.

Well, i still got it, in the readme / config file…
all fine :slight_smile: thx

1 Like

Big Update v2.0.0

  • Completely reworked the entire script.
    • Removed all C# code and replaced it with Lua for ease of use.
    • Added some encryption to the script. (~125 out of ~800 lines)
  • Onesync only. No more non-Onesync compatibility.
    • Now relying on entity state bags.
  • Way better performance.
  • TransportCreator rebuild in Luas version of OOP.
    • Transport data remained the same.
    • Can now be used anytime as long as permission is given to the commands. No need to start it in DEBUG mode anymore.
  • Fixed several problems with the old version.
    • Most notably: Ramp attaching/detaching synced properly. No more "under the floor spawns" etc.

Hotfix v2.0.1

  • Added Onesync as a dependency in the fxmanifest.
  • Fixed being able to detach vehicles from the transport when inside the transport.

Hotfix v2.0.2

  • Fixed display of the box when creating a new transport.
3 Likes