Use in FiveM
Using the prop on your server
Unzip into a resource folder, add one line to server.cfg, and spawn or place the prop by its name.
Downloading
FiveM .zip at the top right of the result page downloads the ready resource. The arrow next to it opens more options.
- 1. FiveM .zip: complete resource
- 2. GLB Model: for Blender and other 3D tools
- 3. Preview files: look at single files
- FiveM .zip: the complete resource. This is what goes on your server.
- GLB Model: the model for Blender and other 3D tools, if you want to edit it yourself.
- Preview files: look at single files, such as the source picture or the YDR, without downloading the zip.
Every prop stays in Assets, so you can download it again at any time.
Install the resource
The zip holds a fxmanifest.lua, a stream folder and the GLB. It has no outer folder, so you make one.
- 1
Make a resource folder
In your server's
resourcesdirectory, make a folder named after the prop, for exampleroad_barrier, and unzip the download into it. The GLB is not needed on the server; you can delete it. - 2
Add it to server.cfg
Add one line with the folder name:
ensure road_barrier - 3
Restart the server
Restart the server, or start the resource, and reconnect.
Keep the YTYP
The YTYP tells the game the model name and its size, and the manifest registers it. Without it the prop does not load. Keep all files of the stream folder together.
Several props can share one resource: put all their stream files into the same stream folder. The manifest picks up every file there.
Spawn it from a script
The model name is the name you gave the prop, in lowercase with underscores, such as road_barrier. You spawn it like any GTA object. This client script puts it on the ground two metres in front of the player:
local model = `road_barrier`
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
local ped = PlayerPedId()
local pos = GetOffsetFromEntityInWorldCoords(ped, 0.0, 2.0, 0.0)
local obj = CreateObject(model, pos.x, pos.y, pos.z, true, false, false)
PlaceObjectOnGroundProperly(obj)
SetModelAsNoLongerNeeded(model)Inventory, placement and job scripts that take a model name, such as ox_target zones or props held in an animation, use the same name.
Place it in a map
To put the prop at a fixed spot for everyone, place it into a map file of your server with a map editor such as CodeWalker. Load the prop's stream files in the editor, add an entity with the model name, and save the map as a .ymap in a resource that streams it.
Animate or merge it
- Animate opens the prop in Prop Studio, which animates doors, gates and machines. A generated prop is one piece, so it moves as a whole there.
- Merge combines the prop with others from your assets into one streamed resource, for free.