Skip to content

Use it

Installing on your server

Make a folder, unzip into it, add one line to server.cfg, restart. Then spawn the prop by its name.

Install the resource

  1. 1

    Make a resource folder

    The zip has no outer folder. In your server's resources directory, make a folder with the name of the prop, for example park_bench, and unzip the download into it. fxmanifest.lua and the stream folder must sit directly in it. You can delete the GLB.

  2. 2

    Add it to server.cfg

    Add one line with the folder name:

    ensure park_bench
  3. 3

    Restart the server

    Restart the whole server once, so the game registers the new model, and reconnect.

Several library props can share one resource: put all their stream files into one stream folder, or let Merge build the resource for you. The manifest picks up every file in stream.

Spawn it from a script

The model name is the name you gave the prop at the import, here park_bench. You spawn it like any GTA object. This client script adds a test command that puts the bench on the ground two metres in front of you:

RegisterCommand('park_bench', function()
    local model = `park_bench`
    if not IsModelInCdimage(model) then
        print('park_bench is not streamed, check the resource')
        return
    end
    RequestModel(model)
    while not HasModelLoaded(model) do Wait(0) end
    local pos = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, 0.0)
    local obj = CreateObject(model, pos.x, pos.y, pos.z, true, true, false)
    PlaceObjectOnGroundProperly(obj)
    FreezeEntityPosition(obj, true)
    SetModelAsNoLongerNeeded(model)
end, false)

Type /park_bench in the chat. Scripts that take a model name, such as housing, placement or ox_target scripts, use the same name.

Note

The prop is frozen, so it does not tip over when a car hits it, and it has collision, so players can sit on the bench with a sit script that knows the model.

Place it in a map

To put the prop at a fixed spot for everyone, place it into a map file with a map editor such as CodeWalker: load the stream files of the prop, add an entity with the model name, and save the map as a .ymap in a resource that streams it. The 3D Generator guide has the details under Place it in a map. For whole rooms, the Interior Builder uses GTA props instead.

Keep the credit with the resource

For a CC-BY or CC-BY-SA model, add a CREDITS.txt next to fxmanifest.lua. It does no harm to the server and travels with the resource wherever it goes:

Models in this resource

"bench" from the Holiday Kit by Kenney (https://kenney.nl), CC0.
No credit required.

"<title>" by <author> (<Sketchfab link>)
Licence: CC BY 4.0, https://creativecommons.org/licenses/by/4.0/
Changes: converted to a FiveM prop, scaled and reduced.

Replace the placeholders with the title, author and link you noted in the import dialog. More on the licences: Licences and credit. The list of your imports is always in your assets.