We are your new 5-Star Hosting Company. At least according to ★ Trustpilot

Following along with a GTA V FiveM server? Deploy yours in minutes.

All servers come with a 24-Hour Trial, Free Backups, and 40Gbps DDoS Protection included!

Use code SAVE15 to take 15% OFF Your First Invoice with ChicagoServers! Limited Time!
GTA V FiveM guide

How to Add FiveM Resources and Fix Common Script Errors

By the ChicagoServers team · Updated · 7 min read

A FiveM resource is a folder under resources/ with an fxmanifest.lua at its root. To add one on ChicagoServers, upload the folder on the Files tab, add ensure folder-name to server.cfg on the Configs tab below anything it depends on, then type refresh and ensure folder-name on the Console tab. If it fails, the console output usually names the resource and the reason.

This guide covers the manifest fields you will actually use, how load order works, and what the most common console messages mean. Messages and commands here come from FiveM's documentation and server source; third-party errors are marked as such.

Quick answer
  • Every resource needs fxmanifest.lua directly in its folder. A nested folder after unzipping is the most common reason a resource is not found.
  • Folder name must match the name in your ensure line exactly.
  • Put dependencies (database layer, framework core) above the resources that use them.
  • After adding files while the server runs, type refresh, then ensure resourcename, on the Console tab (pressing Send each time).
  • For "server thread hitch warning" lines, find the slow resource with profiler record 500 and profiler view in the Console tab.
On this page
  1. How resources are organized
  2. fxmanifest.lua basics
  3. Step-by-step: add a resource on a ChicagoServers server
  4. Dependency order
  5. Reading the txAdmin console
  6. Hitch warnings and performance
  7. When the server is up but players cannot find or join it
  8. Frequently asked questions

How resources are organized

Resources load from the resources/ folder in your server data directory. Any folder there is treated as a resource, except folders in square brackets, which are categories that can hold many resources. Category names are for organization only; you can ensure [category] to start everything inside.

Typical layout
resources/
  [framework]/
    my-framework-core/
      fxmanifest.lua
  [scripts]/
    my-script/
      fxmanifest.lua
      client.lua
      server.lua

Folder names are free-form, but they are what you type after ensure. Files named the old __resource.lua still load with a deprecation warning, but new resources should use fxmanifest.lua.

fxmanifest.lua basics

The manifest is always Lua and tells the server which files to load. A minimal one looks like this:

fxmanifest.lua
fx_version 'cerulean'
game 'gta5'

author 'Your Name'
description 'What this resource does'
version '1.0.0'

shared_script 'config.lua'
client_scripts {
    'client/*.lua'
}
server_scripts {
    'server/*.lua'
}

dependencies {
    'oxmysql'
}
FieldWhat it does
fx_versionSelects the manifest version. The docs list cerulean as the current one. A missing value triggers a console warning and the resource is not allowed to load.
game / gamesWhich game the resource supports: gta5, rdr3 or common. A resource that does not support the current game is skipped with a warning.
client_script(s), server_script(s), shared_script(s)Scripts to load on the client, server, or both. Globs such as *.lua and **/*.lua are supported.
files and ui_pageExtra files that clients need, such as an HTML interface. Files referenced by ui_page must also be listed.
dependency / dependenciesRequires the named resource to load before this one. It can also hold runtime constraints such as /onesync.
provideDeclares that the resource can stand in for another, such as a drop-in replacement for a database library.
server_only 'yes'Stops clients from downloading the resource.

Step-by-step: add a resource on a ChicagoServers server

  1. Read the resource's page

    Look for dependencies, a required framework, SQL to import, and any config values to edit.

  2. Upload the folder

    Open the Files tab, go to resources/ (use a category folder if you like) and click Upload, or drag the folder onto the page. For a .zip, right-click it and choose Extract here, then delete the .zip. For large uploads use SFTP: copy Host, Port and Username from the blue SFTP bar (the password is your panel password).

    resources/[scripts]/my-script/fxmanifest.lua
  3. Check the folder is not nested

    Open the resource folder and confirm fxmanifest.lua is directly inside. Archives often unzip to my-script/my-script/.

  4. Import any SQL

    If the resource ships a .sql file, import it into the database before starting. Create a database on the Databases tab if you do not have one (it shows when your plan includes databases), then click Open phpMyAdmin and import the file there.

  5. Add it to server.cfg

    Open the Configs tab, pick server.cfg (the copy marked In use), and add ensure my-script below the lines for anything it depends on. Click Save.

    ensure my-script
  6. Load it live

    Open the Console tab, type refresh and press Send, then type ensure my-script and press Send. Watch the output for errors. A Restart at the top of the page also loads it from server.cfg.

  7. Test as a player

    Join and test the feature. Keep the console open while you do.

Hosting with ChicagoServers? The GTA V FiveM server hosting page lists what is included, such as free server backups and SFTP file access. The Resources tab on your server's page is also there for FiveM resources, and the file route above works for any resource. Make a backup on the Backups tab before adding a large framework.

Dependency order

The manifest's dependencies field says a resource needs another to load before it. The documentation does not promise that it will start missing dependencies for you, so do not rely on that. Instead, list dependencies explicitly above the resources that use them in server.cfg, and keep your order consistent:

  1. Database layer and libraries
  2. Framework core
  3. Framework add-ons and job scripts
  4. Standalone scripts and UI
  5. Your own scripts

If a script calls an export from a resource that has not started yet, you will usually see a runtime error that names the missing export. The fix is almost always to move the dependency's ensure line higher. Also remember that restarting a dependency at runtime can stop the resources that depend on it without restarting them again, so restart the dependents too.

Reading the txAdmin console

The Console tab in the panel and txAdmin's Live Console (open it with the txAdmin button at the top of your server's page) both show the server output; txAdmin adds a log file, command history and search. Search for the resource name first. The following messages come directly from FiveM's source or documentation:

MessageWhat it meansWhat to do
Couldn't find resource X.No loaded resource has that name. Either the folder name differs from what you typed, the folder is nested, or the server has not refreshed.Check the spelling and the folder level, run refresh, and try again.
Resource loading for X failed: (followed by a reason)The manifest could not be loaded, often a syntax error in fxmanifest.lua.Read the reason line. Fix the Lua syntax in the manifest.
Couldn't start resource X.The resource exists but failed to start.Scroll up for the error that came before it.
X does not have a resource manifest (fxmanifest.lua)The manifest is missing or misnamed. On Linux the filename is case sensitive.Move or rename the file.
Resource X does not specify an `fx_version` in fxmanifest.lua.The manifest has no fx_version.Add fx_version 'cerulean'.
Resource X does not support the current gameThe game line does not include the game your server runs.Fix the game or games line.
SCRIPT ERROR: with a stack traceA running script threw an error. Skip any internal citizen:/scripting/ lines and find the first line in your resource.Open the named file and line.

Community guides also report "No such export" errors when a resource calls another that is not running or started later, and "attempt to index a nil value" for something that has not initialized yet. Both usually point back to start order.

Hitch warnings and performance

A "server thread hitch warning" line, shown as server thread hitch warning: timer interval of ... milliseconds, means the server thread was blocked longer than it should be. Community guides attribute most hitches to a resource looping over all players, slow database queries, or events sent too often. An isolated one at startup is normal; repeated ones under load are worth chasing.

FiveM's own profiler finds the culprit. Run these on the Console tab (or txAdmin's live console), pressing Send after each:

Profiler commands
profiler record 500
profiler status
profiler view
profiler saveJSON profile.json
  • profiler record 500 captures 500 frames. Trigger the lag while it records.
  • profiler status shows whether the capture has finished.
  • profiler view opens the capture in Chrome. When run on the server, it gives you a link to copy into Chrome.
  • profiler saveJSON profile.json saves it for later; fetch the file from the Files tab. In Chrome DevTools, use the Performance tab and load the profile. The yellow resource tick events show time per resource, with file and line numbers.

Fixes follow the finding: update or replace the resource, reduce its loops, timers or events, or disable it to confirm it is the cause.

When the server is up but players cannot find or join it

  • Check sv_master1 is commented out in server.cfg on the Configs tab. If the line is present uncommented, the server shows as private and the browser's connect button is disabled.
  • Test http://your-ip:port/info.json in a browser, using the IP and port shown at the top of your server's page, and try connect ip:port from the F8 console in FiveM.
  • A new server can take up to about 8 minutes to appear in the server list.
  • If the server will not start or keeps dropping players, open the Troubleshoot tab and read What the checks found, then the last lines on the Console tab. Undo the last resource you added if the problem started with it.

Frequently asked questions

Why does FiveM say it can't find my resource?

The name in your ensure line must match the folder name exactly, and fxmanifest.lua must be directly inside that folder. Archives often unzip into a nested folder (use Extract here on the Files tab, then check the folder level). After fixing it, type refresh and ensure the resource again on the Console tab.

What does fxmanifest.lua need at minimum?

An fx_version (cerulean is the current one in the docs), a game line such as game 'gta5', and the scripts to load, for example client_script and server_script entries.

What is a server thread hitch warning in FiveM?

It means the server thread was blocked for longer than it should have been, usually by a resource doing heavy work. Use profiler record 500 and profiler view on the Console tab to see which resource is responsible.

Do I need to restart the server after adding a resource?

Not always. Type refresh on the Console tab so the server rescans the resources folder, then ensure the resource. Add its ensure line to server.cfg on the Configs tab so it also starts on the next boot.

We are your new 5-Star Hosting Company. At least according to ★ Trustpilot

Following along with a GTA V FiveM server? Deploy yours in minutes.

All servers come with a 24-Hour Trial, Free Backups, and 40Gbps DDoS Protection included!

We offer quality support, a detailed knowledgebase, video tutorials on most topics, and even live support in case you prefer a live human.

Use code SAVE15 to take 15% OFF Your First Invoice with ChicagoServers! Limited Time!