You need OpenIV, nodejs, npm and this tool :
npm install -g ymap-utils
If you installed it at the time I written my previous tutorial [How-to] Map an interior and stream it in FiveM you have to update it to 2.1.1
npm update -g
Create a props folder inside resources then add start props in your server.cfg.
Create a stream folder inside props and a file named __resource.lua with this content :
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" data_file 'DLC_ITYP_REQUEST' 'stream/props.ytyp'
Add your props and texures to the stream folder.
If you have a file named the_prop.ydr rename its texture to the_prop.ytd, this is important, ydr and ytd must have the same file name before extension so we can automate the process.
Using four favorite file explorer, grab the full path to the streamprops folder, for me this is C:UsersNGDDesktopfxserverresourcesprops
now open a command prompt and type :
ytyp --genprops --directory "C:UsersNGDDesktopfxserverresourcespropsstream"
The program generate a file named props.ytyp.xml
Put OpenIV in Edit Mode and drop the file in it, then drop it back to the stream folder, now you have props.ytyp
You can now spawn the object
- With your favorite map editor
- Using CreateObject
- Using ESX : /spawnobject the_prop