[HELP] vehicle_names.lua doesnt work

My resource.lua

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

description "Car Add-on"

files {
--    'data/vehiclelayouts.meta',
--    'data/contentunlocks.meta',

data_file 'HANDLING_FILE' 'data/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'CARCOLS_FILE' 'data/carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
--data_file 'VEHICLE_LAYOUTS_FILE''data/vehiclelayouts.meta'
-- data_file 'VEHICLE_SHOP_DLC_FILE' 'data/'
--data_file 'CONTENT_UNLOCKING_META_FILE' 'data/contentunlocks.meta'

client_script {

My vehicle_names.lua

	AddTextEntry('0xA922F05E', '17m760i')

i use esx advanced garage and all vehicles still show as null

same i did everything
no luck still NULL

1 Like

Poeople will tell you this doesnt work but all mine are like this and they work perfectly:

function AddTextEntry(key, value)
	Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
    AddTextEntry('CadCTSV', '2016 Cadillac CTS-V') -- Enter Gamename from vehicles.lua and what you want it to display.
    AddTextEntry('GMT900ESCALADE', 'Cadillac Escalade')
    AddTextEntry('ROYALE', 'Cadillac XTS Lino Royal')
    AddTextEntry('CATS', '2016 Cadillac ATS-V')
    AddTextEntry('sixtyone41', '1941 Cadillac Seris 61')
1 Like

No, people will probably tell you that you’re unnecessarily invoking a native.

If you are going to use the hash you need to invoke it differently. Instead of your code try the following:

    AddTextEntryByHash(<hash>, "text")

Or in your case exactly like this:

    AddTextEntryByHash('0xA922F05E', '17m760i')

The AddTextEntry will only work when you use the vehicle name set in the vehicle meta. So if your vehicle name is 17m760i in the vehicle meta then that’s what you set in the first part and for the second it would be the name you want to show. For example:

	AddTextEntry('17m760i', '2017 m760i')

Also check vehicles.meta for <gameName> and <txtName>

If that is blank then that will also cause the vehicles to show as null in the garages. For the name you can just put the same thing as the <modelName>

1 Like