Installing a FiveM resource

Add a resource to a FiveM server by placing it in the resources folder and starting it from server.cfg.

Applies to
  • Multiplayer
Last checked

A FiveM resource is a folder the server loads: a vehicle, a script, a map, a uniform pack. Resources are installed on the server, and the server sends players what they need when they join.

What a resource looks like

policecar\
  fxmanifest.lua
  stream\
    policecar.yft
    policecar_hi.yft
    policecar.ytd
  data\
    vehicles.meta
    carvariations.meta

fxmanifest.lua tells the server what the resource holds. A folder without one is not a resource. Older resources use __resource.lua, which current servers may refuse.

Files in stream are game assets sent to players: models and textures. Scripts are listed in the manifest as client_script or server_script.

Install the resource

  1. Extract the download. Check that fxmanifest.lua sits directly inside the resource's folder, not one level further down.

  2. Copy the folder into the server's resources folder. You can put it in a category folder whose name is in square brackets, such as resources\[cars]\policecar\.

  3. Open server.cfg and add a line with the folder's name:

    ensure policecar
    
  4. Restart the server, or type refresh and then ensure policecar in the server console.

The name after ensure is the folder's name, without the category folder. Don't rename the folder unless the readme says you can: some scripts look themselves up by name.

To start everything in a category at once, name the category:

ensure [cars]

Order and dependencies

The server starts resources in the order server.cfg lists them. A resource that needs another, such as a framework or a database library, goes after it. The readme or the manifest's dependency lines say what is needed.

Client-side and server-side

A resource can run code on the server, on each player's game, or both.

  • Client-side files are downloaded by every player: vehicles, textures, menus, and scripts that draw on screen. Anyone who joins can read them.
  • Server-side code stays on the server: permissions, saving, anything players must not be able to change.

A vehicle pack is client-side only. A dispatch or duty script usually has both parts, and often a config.lua to edit before the first start.

Check that it started

Watch the server console as it starts. It prints a line for each resource, and a warning or error if a manifest is wrong or a file is missing. In the game, open the F8 console to see client-side errors.

For a vehicle, spawn it by its model name. If it has no textures, see A vehicle has no textures or spawns invisible.

The FiveM documentation covers resources and the manifest in full.