Preventing vehicles from spawning through vehicles.meta file

I’ve been trying everything lately to disable specific vehicles from spawning using the frequency and maxNum flags in the vehicles.meta file following this post:

so I tried making a resource containing two files:

fxmanifest.lua

fx_version 'cerulean'
games { 'rdr3', 'gta5' }

files {
    'vehicles.meta',
}

data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'

vehicles.meta

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

<CVehicleModelInfo__InitDataList>
	<residentTxd>vehshare</residentTxd>
	<residentAnims />
	<InitDatas>
		<Item>
			<modelName>turismor</modelName>
			<txdName>turismor</txdName>
			<handlingId>TURISMOR</handlingId>
			<gameName>TURISMOR</gameName>
			<maxNum value="0" />
			<frequency value="0" />
		</Item>
		<Item>
			<modelName>zentorno</modelName>
			<txdName>zentorno</txdName>
			<handlingId>ZENTORNO</handlingId>
			<gameName>ZENTORNO</gameName>
			<maxNum value="0" />
			<frequency value="0" />
		</Item>
		<Item>
			<modelName>lazer</modelName>
			<txdName>lazer</txdName>
			<handlingId>LAZER</handlingId>
			<gameName>LAZER</gameName>
			<maxNum value="0" />
			<frequency value="0" />
		</Item>
		<Item>
			<modelName>hydra</modelName>
			<txdName>hydra</txdName>
			<handlingId>HYDRA</handlingId>
			<gameName>HYDRA</gameName>
			<maxNum value="0" />
			<frequency value="0" />
		</Item>
		<Item>
			<modelName>rhino</modelName>
			<txdName>rhino</txdName>
			<handlingId>RHINO</handlingId>
			<gameName>RHINO</gameName>
			<maxNum value="0" />
			<frequency value="0" />
		</Item>
  	</InitDatas>
</CVehicleModelInfo__InitDataList>

but nothing seems to work:

IF the vehicles are stationary you would have to get rid of the CarGenerators using codewalker. There are plenty tutorials out there on how to do that. I suggest to use the one from Tobiii as I know that one works. I hope this is what you mean, let me know if that worked :+1:

Edit the popgroups.ymt and stream it
Edit the veh rich index

there’s like 3 of em, which one should I go with?
image

I think I found it, so do I just remove the ones I don’t want to spawn from this list and then stream this file?

Get the levels/gta5/
and
stream it
sample snippet for fxmanifest

files {

'popgroups.ymt'

}

data_file ‘FIVEM_LOVES_YOU_341B23A2F0E0F131’ ‘popgroups.ymt’

1 Like

you can remove or replace the model, just be careful of syntax error, or else no vehicles will spawned at all

1 Like

That’s exactly what I figured out and thanks to a topic that I found while researching this matter:

do you know why I can’t find the firetruk and ambulance in there?
I would love to remove those from the map.
EDIT: I just noticed a large set of vehicles that normally spawn in GTA don’t exist in the file.
example: lguard, dump, carbonrs, zentorno

dumping

well about that…
There is a tuned jester always spawning in here but all the car generators here show the model as 0 so how do I take out the only one that generates the super cars like jester and zentorno?

oh problem solved!
It was a scenario not a car generator