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.
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.
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.
Add the peds.meta to the files{} table of __resource.lua.
Add the directive for this file: data_file "PED_METADATA_FILE" "peds.meta"
Load your new character model through Enhanced Reborn Trainer, by entering its name (second page).
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.
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… Maybe someone have a working ped archive that 100% works, so i could use it as example for future?
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.
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.
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)