İçeriğe geç
Resources

Installing and ordering resources

How to install FiveM resources: where the folder goes, ensure vs start, category folders, load order, dependencies, SQL and items, updating, and what to check first.

Bu dokümanlar şimdilik İngilizce.

Last updated

A resource is any folder with an fxmanifest.lua: a script, a map, a car pack, a loading screen. Installing one takes a minute once you know the pattern. Most “it doesn’t work” reports come from the same five mistakes, listed at the end.

The install pattern

  1. Download the resource. From GitHub, use the Releases page and download the release zip (not “Code > Download ZIP”) when the project publishes releases: releases contain built files like compiled UIs.
  2. Extract it into your server’s resources folder, usually into a category folder like resources/[standalone] or resources/[local].
  3. Check the folder: the fxmanifest.lua must be directly inside it. Rename the folder if needed (remove -main, -master or version suffixes, unless the README says the name must stay).
  4. Read the README: dependencies, SQL files, items, convars, required folder name.
  5. Import SQL if there is any (HeidiSQL: select your database, File > Run SQL file).
  6. Add it to server.cfg with ensure name, after its dependencies.
  7. Start it without a full restart: refresh, then ensure name in the live console.
  8. Check the server console and F8 for errors.

ensure, start, stop, restart

Command Effect
ensure name Start if stopped, restart if running. Use this in server.cfg.
start name Start if stopped. Does nothing if running.
stop name Stop it.
restart name Restart if running.
refresh Rescan the resources folder for new or changed manifests.
ensure [folder] Start every resource in a category folder.

ensure is what you want in server.cfg. The name is always the folder name, never what the manifest or README title says.

Category folders

Folders in square brackets are categories, not resources:

Text
resources/
├─ [cfx-default]/     mapmanager, spawnmanager, chat...
├─ [ox]/              oxmysql, ox_lib, ox_target, ox_inventory
├─ [framework]/       qbx_core or qb-core or es_extended...
├─ [standalone]/      pma-voice, bob74_ipl...
├─ [maps]/            MLOs and ymaps
├─ [cars]/            vehicle packs
└─ [local]/           your own resources

They’re just for tidiness, and they let you start a group with one line. Categories can be nested ([cars]/[police]/). Don’t put a resource and its category at the same level with the same name.

Load order

Resources start in the order of the ensure lines. A good general order:

server.cfg
# 1. Cfx defaults
ensure mapmanager
ensure chat
ensure spawnmanager

# 2. Database and core libraries
ensure oxmysql
ensure ox_lib

# 3. Framework core
ensure qbx_core            # or qb-core / es_extended

# 4. Libraries that depend on the framework
ensure ox_target
ensure ox_inventory

# 5. Framework resources and everything else
ensure [qbx]
ensure [standalone]
ensure [maps]
ensure [cars]

# 6. Your own
ensure [local]

If a resource declares dependencies in its manifest, FXServer starts them first automatically and refuses to start the resource if one is missing. That’s the safety net, not a reason to skip a sensible order. More in Exports and dependencies.

Tip

Big servers keep the resource list in a separate resources.cfg and exec resources.cfg from server.cfg. The server.cfg Generator can lay out the resource section for you.

Framework resources

Resources written for a framework need extra steps, usually in the README:

  • Items: add them to the inventory’s item list (ox_inventory/data/items.lua, qb-core/shared/items.lua, or the ESX items table) and put the item images in the inventory’s image folder. The Inventory Icons tool makes transparent item icons and the matching items.lua entries.
  • Jobs: add the job to the framework’s job list. See the framework quick starts: QBCore, Qbox, ESX.
  • SQL: import the tables.
  • Config: pick the framework, target system (ox_target, qb-target), inventory and notification system in the resource’s config.lua.

Updating a resource

  1. Read the changelog for breaking changes and SQL migrations.
  2. Back up the old folder (and the database if there’s a migration).
  3. Replace the files, but keep your config (copy config.lua back, or merge new options into it).
  4. Run migration SQL if any.
  5. ensure name or restart the server.

Keeping your server folder in git makes this much safer: you see exactly what changed and can roll back.

The five classic mistakes

  1. Nested folder: [local]/mycar/mycar/fxmanifest.lua. The manifest must be one level down.
  2. Wrong name: ensure mycar for a folder called mycar-main, or case differences on Linux.
  3. Missing dependency: the README said ox_lib, you don’t have it, or it starts after.
  4. SQL not imported: Table 'x' doesn't exist in the console.
  5. Source zip instead of release: the UI is blank or shows a message that it isn’t built, because the built files are missing. Download the release.

Where to find resources

Avoid “leaks” sites and packs of hundreds of resources from unknown sources. See Security basics.

Pages in this section