Addon cars in traffic

how would i go about making the cars i have added
spawn as traffic all over the map i have looked and
couldn’t find any similar topics. any help would be nice

2 Likes

Create a resource to use a custom popgroups.ymt, inside the __resource.lua write this:

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

data_file 'FIVEM_LOVES_YOU_341B23A2F0E0F131' 'popgroups.ymt'

files {
	'popgroups.ymt',
}

Afterwards, extract the popgroups.ymt from your game folder (It’s probably in the data folder somewhere) and place the popgroups.ymt file into your resource’s folder alongside __resource.lua.

Now open the popgroups.ymt and do CTRL + F to open the search bar on a decent text editor. There are three types of vehicle class

  • VEH_POOR
  • VEH_MID (You may also want to modify VEH_MID_MP as well)
  • VEH_RICH

Search for one of those to bring up the XML grouping name and you should see, if you scroll down, quite a few vehicles already as children to the parent (e.g Baller is a child to VEH_RICH).

Simply just copy a line such as <Item><Name>alpha</Name><Variations type="NULL"/></Item> and paste it under the vehicle class group below or above the rest of the lines containing vehicles. Change value between the tags to the name of the custom vehicle you want.

When your done it should look something like this:

<Item>
			<Name>VEH_RICH</Name>
			<models>
				<Item><Name>CUSTOMCARNAME</Name><Variations type="NULL"/></Item>
				<Item><Name>Baller</Name><Variations type="NULL"/></Item>
				<Item><Name>baller2</Name><Variations type="NULL"/></Item>

That’s what worked for me, let me know if you need anything clarified I’m not the best when it comes to making instructions simple enough :joy:

12 Likes

will give it a go now thanks for replying

1 Like

When I add a resource to load a custom popgroups.ymt, my FiveM client gives me the error “Couldn’t load resource traffic. :(” Where traffic is the name I gave that resource.
It doesn’t matter wether I use the popgroups from my GTA installation or a custom one, the message stays.

Thanks so much, this actually worked.

Please give me a video guide

1 Like

What do you use to open the pco/ymt file? Openiv dont work and ive been looking for a few hours for something that will open it and got nothing. @Zulfurix

It’s been a while since I did it, but I’m pretty sure I used OpenIV

Hello.

I need help, sorry for reviving this topic.
I tried this to add addons police cars/patrols. I have no errors, but its not working.

This is my fxmanifest.lua:
fx_version 'cerulean'
game 'gta5'
author 'Alzhe + all devs worked on all scripts.'
description 'Resource principale travaillée et importée par Alzhe'
version '1'

client_script 'cl/*.lua'
server_script 'sv/*.lua'

data_file'GTXD_PARENTING_DATA' 'client/hud/mapzoomdata.meta' -- HUD
data_file 'FIVEM_LOVES_YOU_341B23A2F0E0F131' 'popgroups.ymt'

files {
    'load/index.html',
    'load/keks.css',
    'load/bankgothic.ttf',
    'load/loadscreen.jpg',
    'load/martiallaw.mp3',
    'popgroups.ymt'
}

loadscreen 'load/index.html'

This is my popgroups.ymt.
Loaded in a pastebin page because too much characters.

My resource is like that.
image

Does something badly done ?

FIRST EDIT
I realized that the .ymt thing in the DATA FILE line was useless. I removed it.
Something happened. No one cars spawning.

data_file 'FIVEM_LOVES_YOU_341B23A2F0E0F131' 'popgroups.ymt'

I also found that my base file isn’t really good. I’ll check to find the popgroups.ymt correct file.

  • Not Working.

SECOND EDIT.
Replaced FIVEM_LOVES_YOU_341B23A2F0E0F131 by DLC_POP_GROUPS.

  • Not Working.

3rd EDIT
Ensure streams before the alzCore.

  • Streaming Working. Random NPC Working. Cops NPC Addons Cars NOT WORKING.

King regards,

Any luck making the resource? Would love to get something like this going in my server

Maybe another popgroups file is streaming, qbcore has streaming default popgroups in qb-smallresources.

Hello.

For my end, i don’t use qbcore, or any framework.

King regards,

Hello.

I was disconnected all July month. I’m here, i’ll try it soon.

King regards,

hmmm, it would be nice to have a toggle version of this since its so easy to mess up your server trying. this is why i have a experimental server though.

anyone know why most of the peds are only using 2 or 3 cars. the list of cars is pretty big but its the same 3 cars all over

alright how does this work i added the __resouces.lua and the popgroups to my FiveM resources file and added e500(addon) to VEH_RICH and VEH_RICHMP but it has not shown up i have also added e500 to my resources file and it works I can spawn it using vmenu but how do i make it work for the popgroups do i need to put the addon in the normal game files to? please any help is needed i love cars and i want my FiveM server to have custom cars roaming the streets.

Thanks,
PS i know this forum is pretty much old and possibility dead but it’s the only helpful one.