Hello, this is my first ever tutorial on the forums so be nice and give me some feedback Ok so in this post I am going to help you add loads of cars all into 1 resource easy. I have not seen a tutorial on this so far and it would have helped me if I saw this when starting out. This 100% works with add-ons and tell me down below if it doesnât with replace.
Ok, so we start assuming you have collected all the vehicle files, modification files, and the .meta files.
Create the main resource. You can name this what you want and this will house all the cars. Make sure to add this to the autostart .cfg file that you use for your server.
Download the cars you want and get all the files you want using openiv or if it comes FiveM Friendly
You will need a stream folder and a data folder. This will consist of 2 parts.
a) In the stream folder create another folder with the cars name and put all the car files in here (ytdâs and ytfâs) make sure you remember the name of the stream folder to make things clean you will use it again.
b) Open the data file and create a folder with the same name as the one in the stream folder and this is where all the .meta files will be for this car.
Now go into the resource.lua (Example will be attached to help) and for each car you add you will need to do the below:
It DOES NOT matter if you do not have one of the files just make sure you add all, it works fine like that for me.
In the future I might be releasing a pack I have added to over time, none of the vehicles are mine but when I release it I will link it in this topic. Keep your eyes open
then I type in my resource autostart config file
âstart vehiclesâ
Everything seems to load up fine, no errors in my server console, however I still canât spawn the vehicles? I try â/car benson3â which works to spawn it if i give it an individual __resource.lua, but it doesnt work in this mass __resource.lua. I also try â/car uktaxiâ which is what iâve named the taxi mod as it was a replacement vehicle that iâve converted to an add-on.
Ok thank you for the reply and some others may have this issue. I am not sure if I put this wrong in the instructions or what but what you want is the __reousrce.lua then the data folder and stream folder. You can have the vehicle folder and then inside of that have the data and stream folders but you will have to change all the __resource.lua to say, for example in your case, below:
If you do not want to go through each one in the file and change it just bring the data and stream folder out of the vehicles folder and then delete the vehicles folder and then inside the main resource folder that contains the __resource.lua you would have the reousrce lua, data folder and the stream folder. This may sound complicated so I will put some screenshots below on what mine looks like.
This is the main folder in the resources for the server. Within this:
Hope this makes sense and if it doesnât just say and I can help you out over discord further.
Good luck with adding the vehicles and I hope this helps you. Have a good day
but it still wouldnât work, not sure if itâs because something else is messed up. Like, everything already seems to load, I donât get any errors saying âcant load resource: vehiclesâ or anything like that, I just simply cant spawn the vehicles in game.
Starting to think it might be an issue with my meta files. Anyway, iâm gonna set it up like yours and see if that works.
Do you setup your .cfg file like âstart import-carsâ then?
Iâd be interested in downloading it, if it works! Iâm just getting into this whole having a server thing and any way to make it easier to add large packs of cars would be great lol
I can probably do a video tutorial on this subject on my YouTube channel because Iâm about to finish my ro server and this old method is overly complicated its alot easier than you think so I can always share my method if you guys want
Ah, yes! The resource works perfectly in Windows-based servers though. Iâm glad that it does, except I am also testing this resource in a Linux-based server; the issues indeed persist like youâve said. I am inclined to believe that there is a potential issue with globbing in the latest Linux master build.
I have a problem with thisâŚ
I have car script in server cfg.
When I connect to server I can spawn car but withuot of modyfication, when i restart scirpt then modyfication work. (im still in serwer)
But if I reconnect to server I donth have option do modyfication. Somone can tell me what to do witth this?