Hi, I’m writing because I have encountered a really inconsistent problem with a server I’m trying to setup and I have reached a dead end.
I am trying to make 2 separate addon cars out of the same vehicle – one would have grip handling, the other drift one. I’ve made all the changes to the drift one (all the model and texture names, fields in .meta files, parts names, modkit IDs, etc.). Server registers the addons fine, both cars can be spawned by client, but there is a problem with mod parts (spoilers, engine upgrades, etc.). Sometimes they spawn fine and sometimes all the mods for the car are non-existent.
I’ve been trying to figure out why is it happening and did some tests, this is how it behaves rn:
When restarting the client’s FiveM and joining the session for the first time (since app restart) the mods do not work
When rejoining the session without exiting/restarting FiveM – everything suddenly starts working – can spawn modded parts for both cars
It would be amazing if someone could point me in the direction of what may cause such inconsistencies, I’ve been struggling to set it up for a while now.
So, after struggling with this problem for quite a while I think that I finally found a solution:
The order of declaring .meta files in your __resource.lua is crucial. I had some files declared in the wrong order and therefore my client did not read all of them (especially carcols.meta) upon the first connection to the server.
The correct order should be declared as follows:
Dude I would kiss you if I could!!! I’ve been struggling with this for a few days and eventually gave up… The only way I could get mods to work on my server was to create a resource to restart all the car resources when the server started, but if a player joined after the resource restart he would still have the problem. This solved it, you sir are a genius!! I don’t even need the resource restart
This is not a necessary file to include, it just contains hashes and names of certain stuff (car make, model, parts names) so that it properly displays them ingame. If it is not provided with the addon car than you don’t have to include it, but you can make one yourself if have some problems with vehicle name text ingame.
@Shimp some of my cars works now without vehicles_name.lua file but why some of cars’ texture won’t work properly? the colors are blinking when I move the camera?
TBH I have no idea what could cause this, have not encountered anything like that. Maybe texture file is too big, corrupted, not streamed properly or some fields in vehicle meta are wrongly assigned.