Hello! I will divide it into two parts to make it simple.
Tuning
Are you adding vehicle_names.lua too in your add-on folder? I think that’s the point. Most of the add-on have got global.gxt2 file in the dlc.rpf.
Usually the correct path to find it is dlc.rpf/x64/data/lang/yourlanguagedlc.rpf/global.gxt2
You open it and you have to copy it in the vehicle_names.lua file.
I show you an example - you find this in the global.gxt2 file:
0x004D4C50 = NISSAN
0x2C80553E = Spolier D
0x5A07304B = Spoiler E
0x5D1DDD67 = Paintable
0x6D787E1C = Paintable
0x7EE320F1 = Paintable
0x47FB0C33 = Spoiler B
0x778CEB56 = Spoiler C
0x912F1E9A = Spoiler A
0x7885F497 = Rollcage
0x21733EE8 = Spoiler G
0xA722CA58 = GT-R NISMO
0xACF5D972 = GT3 Hood
0xC88CED4D = Rollcage&RaceSeats
0xD4BCA57C = Spoiler H
0xF0D904C7 = Roof Hood
0xF33BE27A = Spoiler F
0xFE9AA04A = Hood&Spoiler
0xFFB8FBF8 = Roof Spoiler
In this case you have to create vehicle_names.lua file and put it in your add-on folder with all meta files.
Open it and copy this:
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
AddTextEntry('0x004D4C50', 'NISSAN')
AddTextEntry('0x2C80553E', 'Spolier D')
AddTextEntry('0x5A07304B', 'Spoiler E')
AddTextEntry('0x5D1DDD67', 'Paintable')
AddTextEntry('0x6D787E1C', 'Paintable')
AddTextEntry('0x7EE320F1', 'Paintable')
AddTextEntry('0x47FB0C33', 'Spoiler B')
AddTextEntry('0x778CEB56', 'Spoiler C')
AddTextEntry('0x912F1E9A', 'Spoiler A')
AddTextEntry('0x7885F497', 'Rollcage')
AddTextEntry('0x21733EE8', 'Spoiler G')
AddTextEntry('0xA722CA58', 'GT-R NISMO')
AddTextEntry('0xACF5D972', 'GT3 Hood')
AddTextEntry('0xC88CED4D', 'Rollcage&RaceSeats')
AddTextEntry('0xD4BCA57C', 'Spoiler H')
AddTextEntry('0xF0D904C7', 'Roof Hood')
AddTextEntry('0xF33BE27A', 'Spoiler F')
AddTextEntry('0xFE9AA04A', 'Hood&Spoiler')
AddTextEntry('0xFFB8FBF8', 'Roof Spoiler')
end)
It works for me, I’m using it for a Nissan GT-R Nismo add-on.
Car colors and liveries
You have to edit carvariations.meta file inside your addon folder. Example:
look for this code in your carvariations.meta file
<colors>
<Item>
<indices content="char_array">
73
70
73
156
</indices>
<liveries>
<Item value="true" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
</liveries>
</Item>
</colors>
73, 70, 73 and 156 are the colors for that specific model spawn. All those “item values” you see mean if you want to enable or not a specific livery - you have to test it yourself to get the one you want.
If you want to put a static color just replace those numbers (Go here and you will find all different colors codes)
If you want to choose more colors combination just copy this (and copy it again as much as you want):
<colors>
<Item>
<indices content="char_array">
73
70 -- mixed combination
73
156
</indices>
<liveries>
<Item value="true" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
</liveries>
</Item> -- where first combination ends
<Item> -- where second one starts
<indices content="char_array">
83
83 -- full blue color
83
83
</indices>
<liveries>
<Item value="true" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
<Item value="false" />
</liveries>
</Item> -- where second combination ends
<Item>
[...]
</Item>
</colors>
I hope I helped you