[HELP] Packing addon cars

I’ve been trying to pack my addon cars but it doesn’t seem to load in the server. I’ve tried to add all the car metas in one _resource.lua for the first pack.

I put all the ytd and yft in the stream folder already and the metas in a folder with their vehicle names.

Put the stream and resource in each folder not all of them, each folder should have them

I’m trying to run them in one stream folder and one resource file to reduce resource count

I see other servers doing it

This is possible. You must use wildcards within your __resource.lua file as I’ve shown to actually accomplish this, though.

In my example, you can see that I’ve created a root folder containing subfolders for each vehicle add-on. The root folder /LupinsCars3/ also contains a /STREAM/ folder which has each of the vehicle add-ons’ model and texture dictionary files. The .meta files of each vehicle add-on are located in each corresponding subfolder. If you’re using a .lua file for custom vehicle names, you may also place that within the root folder as shown.


This Could Help and Lupin_III’s reply is also helpful

yeah i fixed it. I just had to remove cars/

So putting all the ytd etc files into stream folder and keeping the meta files seperate in their own sub folders works as a single resource? does this still allow you to add upgrades and keep modkits?

Yes—structuring your add-on resource in this fashion allows you to place your model and texture dictionary files into the stream folder, and the .meta files of each add-on into their own respective subfolders. Tuning parts and modkits (assuming they don’t conflict with each other) for each vehicle add-on retain their functionality.

Awesome thank you I’m giving it a try now, I was merging them another way and it was disallowing me to use the addon modkits. So it would look like this? (Im using addon vehicle spawner menu so I do custom names and spawn tags there)

I got a resource.lua problem ): might of been because of the missing {

I keep getting this error now, as far as I know there are no errors in the resource.lua

The post I made in May is slightly outdated.

Since then, I’ve discovered the proper syntax which must be used within the __resource.lua file in order to ensure the proper functionality of each vehicle add-on. On line 15 of your own __resource.lua file, you have an extra comma as the final character, which should not actually be present. In your subsequent post, you can actually see that the connection error details in FiveM mention the unexpected character on line 15 of your __resource.lua file.

You have forward slashes preceding each path within your __resource.lua file as well, and you do not actually want those to be present. Your vehicle add-on subfolders should actually be contained within a subfolder called /data/ as shown, and not exposed within the main resource folder itself. Your model and texture dictionary files are stored in a subfolder called /stream/ as well, which is also shown.

Thank you so much man, everything is working properly, I thought I may have had a problem with them not spawning but it was just 2 of the cars, I appreciate the help so much you’re my saviour

1 Like