[How-to] Stream add-on peds

First of all I’ll assume you have knowledge on how stream add-on vehicles. If you don’t yet then read this post first. I hope I didn’t reinvent the wheel with this. Haven’t seen anyone else post about this.

  1. Place your custom *.ydd, *.yft, *.ymt and/or *.ytd inside an asset folder like you would with vehicles. You can name it anything you like.

  2. Create a peds.meta file and fill it. You can use the XML example below. There’s one for males and one for females. The values in them can of course be changed but that’s outside the scope of this how-to. Make sure the value corresponds with the filename you added without its extension.

  3. Add the peds.meta to the files{} table of __resource.lua.

  4. Add the directive for this file: data_file "PED_METADATA_FILE" "peds.meta"

  5. Load your new character model through Enhanced Reborn Trainer, by entering its name (second page).

The XML example:
http://pastebin.com/zscDEKgG

24 Likes

that post you linked for the addon cars isn’t even for addon cars for your info

1 Like

Thank you. It’s fixed. As you can tell the post was rushed quite badly, but I hope it’s clear enough for everybody to understand.

2 Likes

also for the record its not " in the data file its only one ’

it should be like this data_file ‘PED_METADATA_FILE’ ‘peds.meta’

3 Likes

In my decades of programming I have always used the double-quotes for strings, and single-quotes for characters with some very, very rare exceptions. If you prefer single quotes then you can change that, but it doesn’t matter which you use. Both work and both are proper formatting.

5 Likes

for some reason when I tried it it didn’t work

1 Like

That’s interesting. Would’ve liked to see the __resource.lua that didn’t work, for science.

1 Like

resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

files {
‘peds.meta’
}

data_file ‘PED_METADATA_FILE’ ‘peds.meta’

EDIT: the files things is how its supposed to be just the forums thing that its not in its place

5 Likes

Use the </> button in the text editor to format code.

I’m assuming that’s the resource file that works. I would’ve liked to see the one that doesn’t work.

How do I get custom ped props that come with the ped to work?

peds.meta most likely

1 Like

Anyone else got a more specific response?

Edit: Nevermind, forgot to put the < PropsName> line in my peds.meta.

1 Like

It does not work for me

Here is my __resource.lua file

files {
‘peds.meta’
}

data_file ‘PED_METADATA_FILE’ ‘peds.meta’

Does anyone know what is wrong

2 Likes

Guys, is added ped will be available in Enhanced Trainer as Player -> Change Skin -> Enter name etc ? Or somewhere else?
I’m questioning this, because i need to find a way to stream a player character skins from the server alongside to the cars models. So will it be OK for my needs?

UPD: tried to add some streamed ped and failed. Seems like i’ve done everything just like it was described here, but… :frowning: Maybe someone have a working ped archive that 100% works, so i could use it as example for future?

1 Like

addon peds are broken on FiveM atm. You can make peds replaces just like cars does.
New folder, rename it like you want, in this folder add a “stream” folder and a empty __resources.lua, add your replace peds into the stream folder. Add it to your Autostart resources.

3 Likes

Thanx for the tip!
I’ve downloaded (for example) a Flash superhero and wanted to replace “Armenian goon” slot. I’ve put Flash’s files as
G_M_M_ArmGoon_01.* in stream folder and so on (empty __resources.lua, autostart etc)… And tried to spawn ped/update own skin with this NPC and it fails. :frowning:

be sure that all your files are under 16mb.
rename G_M_M_ArmGoon_01 to g_m_m_armgoon_01 (no caps).
be sure you added your resource folder in citmp-server.yml
rename __resources.lua to __resource.lua (no S at the end)

It work for me. So it should for you too.

2 Likes

Man, you saved my day! Thanx alot! It worked finally.

great news! Glad to helped you

2 Likes

its works but had issues with one ped freezing and the other invisible

1 Like