Render and install
Installing on your server
Drop the folder into resources, add one line to server.cfg and restart the server. Then test it with the chat command or play it from your own script.
What is in a prop resource
A Prop Studio download is a zip named after the prop, for example garden_gate.zip. The files sit directly in the zip, without a folder around them:
client.lua (1 KB)The test command.fxmanifest.lua (1 KB)The manifest.stream/garden_gate.ydr (5 KB)The model. Its name is the model name in scripts.stream/garden_gate.ytd (17 KB)The textures of the model.stream/garden_gate.ytyp (1 KB)The archetype. It marks the model as animated; the manifest loads it.stream/garden_gate_anims.ycd (1 KB)The animation dictionary with every clip.
The names follow the Name in the studio: model garden_gate, animation dictionary garden_gate_anims, and the clip names you set, here open_close.
Install the resource
- 1
Make a folder in resources
In your server's
resourcesfolder, create a folder, for examplegarden_gate. - 2
Unzip into it
Put the contents of the zip into that folder, so it holds
fxmanifest.lua,client.luaandstream. - 3
Add it to server.cfg
ensure garden_gate - 4
Restart the whole server
Restart the server, not only the resource, and reconnect. New models and animations only register when the server starts.
A Prop Attach resource installs the same way; its folder name is up to you as well.
The test command
Every prop resource has one chat command, named after the prop:
/garden_gateIt loads the model and the animation, spawns the prop 2 m from you, freezes it in place and plays the first clip, in a loop when that clip has Loop on. Each use spawns one more copy. The command is for testing. On a live server, spawn and play the prop from your own script.
Playing it from your own script
An animated prop plays its clips with PlayEntityAnim. Load the model and the dictionary, spawn the prop where it belongs, freeze it and start the clip. This client-side example puts the gate at a fixed spot and opens it once:
local model = `garden_gate`
local dict, clip = 'garden_gate_anims', 'open_close'
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do Wait(0) end
-- your position and heading
local gate = CreateObject(model, 215.0, -810.0, 30.7, true, true, false)
SetEntityHeading(gate, 160.0)
FreezeEntityPosition(gate, true)
-- play once and stay at the last frame: loop false, stay true
PlayEntityAnim(gate, clip, dict, 1000.0, false, true, false, 0.0, 0)- The model is loaded by name with backticks,
`garden_gate`; the dictionary is the prop name plus_anims. - For a clip that repeats, such as a fan, pass
trueas the loop value. - To play another clip of the same prop, call
PlayEntityAnimagain with its name, for examplecloseafteropen. - For a prop that is already in the world, get its handle first, for example with
GetClosestObjectOfTypeand the model name, then callPlayEntityAnimon it.
How other players see the prop depends on how your script spawns and syncs it. Test it with two players before you rely on it.
Prop Attach resources
A Prop Attach build makes one resource per version of the animation. For the cup on the moonwalk these are moonwalk_props_static and moonwalk_props_locomotion, the in-place and the walking version. The job page lists the files of both, each ending in a ZIP Package.
- 1. Download FiveM ZIP: the in-place version
- 2. ZIP Package: the second one is the walking version, with no download button yet
Download FiveM ZIP at the top of Files downloads the in-place version, named moonwalk_props-inplace.zip. The walking version has no download button on the page yet.
stream/moonwalk.ycdThe animation, unchanged from the original.client.luaSpawns the props, attaches them to their bones, plays the clip and cleans up.fxmanifest.luaThe manifest.README.txtThe commands, the props with their bones, and a note on trainers.
The files sit directly in the zip. Install it with the steps above; the README suggests the folder name moonwalk_props_static. Replace the original animation resource instead of running both: they stream the same animation dictionary and register the same chat command.
Prop Attach commands
The command of a Prop Attach resource is the clip name of the animation, and a second command stops it:
/moonwalkAttaches the props and plays the in-place version./moonwalk_stopStops the animation and removes the props./moonwalk_moveThe walking version, from its own resource. It stops with /moonwalk_move_stop.
- The props also go away on their own when the animation stops, the player dies, or the resource stops.
- Trainers such as Menyoo play the animation from its dictionary and clip name, but without the props; those only come with the command.
- Emote menus such as rpemotes take a prop model, a bone and six placement numbers per emote. The
PROPStable at the top ofclient.luahas all of them. For playing the animation itself from a menu, see the AI Animations guide.
Note
The chat messages the Prop Attach script prints on errors are in German at the moment. The console lines are English and name the model or clip that failed.