Add-on Vehicles doesn't work

I followed multiple tutorials like this, this and this. I did exactly like they said and it could load the ressource instead of saying “could not load ressource (Name)” but when i get in and open vMenu and click spawn by Model name it says that it could not be found… Can anyone please help me? Iam using a Zap-Hosted server.

First of all, inside the resources folder, make a folder for your vehicles. Inside the vehicles folder, make another folder called “stream”. So it should look like this: image
Then, drop your vehicle model files (.yft & .ytd) in the “stream” folder. I’ll be adding 2 vehicles for this example:

.
Now inside the “Vehicles” folder, copy and paste “carvariations.meta”, “vehicles.meta” and “handling.meta” from one of the vehicles:
image

We need to add every vehicle in each .meta file, so the files should look like this:
carvariations.meta:

<?xml version="1.0" encoding="UTF-8"?>

<CVehicleModelInfoVariation>
  <variationData>
  
  
  
  <Item>
      <modelName>911turbos</modelName>
      <colors>
		<Item>
          <indices content="char_array">
            8 
            8 
            134 
            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>
      <kits>
        <Item>0_default_modkit</Item>
      </kits>
      <windowsWithExposedEdges />
      <plateProbabilities>
        <Probabilities>
          <Item>
            <Name>Standard White</Name>
            <Value value="100" />
          </Item>
        </Probabilities>
      </plateProbabilities>
      <lightSettings value="0" />
      <sirenSettings value="0" />
    </Item>
	
	
	
	
	<Item>
      <modelName>boss302</modelName>
      <colors>
        <Item>
          <indices content="char_array">
            0 
            1
            3
            0 
          </indices>
          <liveries>
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
            <Item value="false" />
          </liveries>
        </Item>      
      </colors>
      <kits>
        <Item>765_boss302_modkit</Item>
      </kits>
      <windowsWithExposedEdges />
      <plateProbabilities>
        <Probabilities>
          <Item>
            <Name>Standard White</Name>
            <Value value="100" />
          </Item>
        </Probabilities>
      </plateProbabilities>
      <lightSettings value="1" />
      <sirenSettings value="0" />
    </Item>
	
	
	

  </variationData>
</CVehicleModelInfoVariation>

Each vehicle is separated with the item tag. I’ve added spaces between vehicles so you know where each one starts.
Same thing has to be done with the vehicles.meta and handling.meta files.
vehicles.meta:
vehicles.meta (11.2 KB)
handling.meta:
handling.meta (5.6 KB)

After doing these steps, create a “__resource.lua” file in the “Vehicles” folder and type the following:

resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'

files {
	'handling.meta',
    'vehicles.meta',
    'carvariations.meta',
    
}

data_file 'HANDLING_FILE' 'handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'

So it should look like this:

Optionally, if you’d like to edit the in-game name of the vehicle, inside “vehicles.meta” find the gamename tag and edit that.
The model name that you can spawn it with is also inside “vehicles.meta” at the modelname section.

Don’t forget to add “start Vehicles” in your server.cfg file and you should be ready to go.

3 Likes

Very detailed, appreciate it you posting this, people could benefit from this post.

1 Like

how do you spawn the vehicles?

nice! it was helpful