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.
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
- 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.
- Extract it into your server’s
resourcesfolder, usually into a category folder likeresources/[standalone]orresources/[local]. - Check the folder: the
fxmanifest.luamust be directly inside it. Rename the folder if needed (remove-main,-masteror version suffixes, unless the README says the name must stay). - Read the README: dependencies, SQL files, items, convars, required folder name.
- Import SQL if there is any (HeidiSQL: select your database, File > Run SQL file).
- Add it to
server.cfgwithensure name, after its dependencies. - Start it without a full restart:
refresh, thenensure namein the live console. - 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:
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 resourcesThey’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:
# 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 ESXitemstable) and put the item images in the inventory’s image folder. The Inventory Icons tool makes transparent item icons and the matchingitems.luaentries. - 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
- Read the changelog for breaking changes and SQL migrations.
- Back up the old folder (and the database if there’s a migration).
- Replace the files, but keep your config (copy
config.luaback, or merge new options into it). - Run migration SQL if any.
ensure nameor 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
- Nested folder:
[local]/mycar/mycar/fxmanifest.lua. The manifest must be one level down. - Wrong name:
ensure mycarfor a folder calledmycar-main, or case differences on Linux. - Missing dependency: the README said ox_lib, you don’t have it, or it starts after.
- SQL not imported:
Table 'x' doesn't existin the console. - 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
- Recommended open source resources: the well known basics.
- forum.cfx.re Releases: free and paid, with the rules that releases must follow.
- GitHub organisations of the frameworks: overextended, Qbox-project, qbcore-framework, esx-framework.
Avoid “leaks” sites and packs of hundreds of resources from unknown sources. See Security basics.
