[Release] Boot Vehicles v1.3 - Persistent Configured Vehicles!

Boot Vehicles

This resource will spawn configured vehicles when the first player joins on your server. This allows the vehicles to be networked for all players to see! This resource adds roleplay when configuring vehicles to be at police stations, fire stations, etc. Just simply spawn a vehicle, drive it where you want, append it to the configuration via a command and you’re done!

Share vehicle files easily, just slap the locations text file in, and add it to the meta!

Save locations/sets easily by just renaming the file and adding it to the meta, so they can keep stuff separated and organized!

1.3 Released! NOW SUPPORTING VEHICLE EXTRAS!

DOWNLOAD LINK
Clone or Download as Zip

The following is a showcase of the resource in action:

Developers:
You can add a boot_vehicles list as a file in your own resource.
Simply add boot_vehicle_file 'filename.txt' to your resource meta.
More files can also be added directly to the main resource instead of via an external resource.

Commands
gvposa - Appends the current vehicle the player is in to the vehicle_positions.txt file inside the resource.
gvpos - Prints current vehicle model hash, X, Y, Z, and heading (Use for debug purposes)
gvpos_trigger - Manually triggers the vehicles to spawn.

Configuration
The vehicle locations text file is located in the same location as the resource, this file is called vehicle_locations.txt.

Included are a couple example vehicle sets, you can add and remove these files in the resource meta to your liking.

After you are done setting vehicle locations please change the DEBUG variable in the cl_bootvehicles.lua to false

Big shoutout to @glitchdetector for contributing; a lot of the recent additions are all thanks to him!

22 Likes

nice release ! but to make it better or a like same ressource is that you type a command like / savevehicle, and it saves that vehicle so it does not dispawn when you are far away nor when you disconnect / reconnect you can retrieve your car.

Not really booting the vehicle then… just forcing those vehicles to stay spawned on server reload…

It’s “boot” as in “startup”, not “boot” as in “put a boot on the vehicle”.

2 Likes

This could be the solution for the esx_garage to save cars on the position even on server restarts :slight_smile:
Would love to see something there where it autosaves the car position each x minutes or something.

1 Like

Indeed to prevent despawn

Resource has been updated to support vehicle extras. Simple as always, commands are the same!

Cool script but I have a few questions:
1. Will an automatic vehicle deletion script effect this?
2. Will this cause a significant amount of lag if there are vehicles all over the map?
3. Will it save the license plate?
-Thanks!

tried what you did and when I came back in the server it was gone

gave me the cords etc

Love the script works very well! Would be nice if we could set these vehicles as undrivable so I could populate my car dealership with latest vehicles but not allow players to steal them.

4 Likes

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Sorry, but I am no copy and paster.

Those natives are required to do the type of magic my resource creates.

But I am sure know a way to do this without using those natives because you just attempted to call me out?

Please go ahead and fork my repository and create a pull request with your different “style”. I do not appreciate you attempting to call me a fraud.

excuse me I just wanted to know if there is a way to make a backup of position vehicle automatically in the log of players :grinning:

Hi Slavko nice realese .
but there is a problem when i do /revive all vehicles spawn again
do you know how to prevent vehicles to spawn again ?

You would have to refer me to the “revive” resource you are using.

  1. Ensure that the DEBUG variable is set to false.
  2. Check to see that your revive resource isn’t triggering the following Server Event https://github.com/itsJarrett/FiveM-boot_vehicles/blob/master/cl_bootvehicles.lua#L80

If you continue to have issues, I encourage you to create an issue on the GitHub repository here so that myself or one of the other contributors can investigate and solve your problem.

@SLuG

I have added this functionality; please refer to 710c918. By default, vehicles will be driveable. To make the vehicles undriveable, go to the vehicle_positions.txt file and change the variable at the very end of the line pertaining to the vehicle you want to be undriveable to true.

@MrOwen

  1. It may, you would have to refer me to it so I could tell you.
  2. Yes. Although it is client side and is by a client by client basis.
  3. I have added the functionality to save the license plate. Refer to 7f019b0.
1 Like

gvposa gives me this error on a clean new server without any other resources. I tried it on another server before and its the same error:

Error running system event handling function for resource FiveM-boot_vehicles: citizen:/scripting/lua/scheduler.lua:24: Failed to execute thread: sv_bootvehicles.lua:67: attempt to concatenate a boolean value (field '?')
stack traceback:
        sv_bootvehicles.lua:67: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:171: in function <citizen:/scripting/lua/scheduler.lua:170>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:24: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:170: in function <citizen:/scripting/lua/scheduler.lua:134>

Fixed this error.

Undriveable status is now stored as a integer.

0 is for driveable, 1 is for undirveable.

thanks, car spawns fine now and no errors. However, changing the last digit of the line from 0 to 1 keeps it still drivable. I also noticed that it shows 1 on the license plate.

1 Like

This doesn’t seem to be working. For some reason it says i loads all the vehicles but it only loads the 1st one.