Everything on a FiveM server that “does something” (the framework, jobs, cars, maps, HUD) is a resource. We'll show you how to upload a script correctly, start it in the right order and what to do when it won't start.
What you'll need
- A FiveM server at StormHost (or your own FiveM server)
- A script (resource) downloaded from a trustworthy source
- A program for extracting archives on your computer (Windows has one built in, or 7-Zip)
- About 20 minutes
What a resource is#
A resource is a folder with scripts and files that the server can start, stop and restart. For the server to recognize it, it must contain an fxmanifest.lua file (__resource.lua in very old scripts).
- The folder name is the resource name. The
ox_libfolder = theox_libresource. This is the name you write inensure. - Inside, there are usually scripts for the server (
server/), for players (client/), shared ones (shared/), configuration (config.lua), a web interface (html/,web/) and models (stream/). - A standalone script works on its own. Others need a framework (ESX, QBCore, Qbox) or a library (
ox_lib,oxmysql). The author lists what the script needs in the instructions (README).
The resources folder and categories#
The server looks for resources in the resources folder next to server.cfg. Folders in square brackets are categories: they aren't resources, just a way to keep things organized.
server.cfg
resources/
├── [standalone]/
│ ├── oxmysql/
│ │ └── fxmanifest.lua
│ └── ox_lib/
│ └── fxmanifest.lua
├── [esx]/
│ └── es_extended/
│ └── fxmanifest.lua
└── muj_skript/
└── fxmanifest.luaThis tree contains the resources oxmysql, ox_lib, es_extended and muj_skript. You start a whole category with a single line, ensure [standalone]. Categories can also be nested.
On a server with txAdmin, the resources folder is in the deployment folder (txAdmin suggests txData/).
Where to get scripts#
- Official sources: the Releases section of the Cfx.re forum (opens in a new window), Cfx Marketplace, the author's GitHub (Releases section).
- Buy paid scripts only through Cfx Marketplace or Tebex. Anywhere else, you risk a scam.
- Don't use “leaks” (stolen paid scripts). They often contain malicious code that “infects” other resources or gives strangers access to your server. FiveM reports such code as prohibited logic.
Installing a script step by step#
Preparing it on your computer#
Download the script. If it has a Releases section on GitHub, download the archive from there, not via Code › Download ZIP. A release includes the built web interface; the source code often doesn't.
Extract the archive.
Find the folder that directly contains
fxmanifest.lua. That's the resource.Rename the folder to the name the author gives. Typically, remove the GitHub suffix: rename
ox_lib-maintoox_lib.Why: other scripts refer to the resource by name. For them,
ox_lib-mainwouldn't exist.Read the README: which dependencies the script has, whether it includes an
.sqlfile and what to set inconfig.lua.
Watch out for a doubled folder
Extracting often creates muj_. Only the inner folder belongs on the server. Otherwise the server reports that the resource has no manifest, or can't find it.
Uploading to the server#
- In the customer area, open My services, click your server and go to the Files tab.
- Open the
resourcesfolder (or a category, for example[standalone]). - Click New folder and create a folder with the resource name, for example
muj_skript. - Open it and upload the files with the Upload button. Recreate the subfolders (
client,server,html…) with New folder and upload their files into them.
The Files tab uploads individual files up to 100 MB and doesn't extract archives. Upload large resources (cars, clothing, maps, a whole framework) over SFTP. Support will set up access for you (contacts); the procedure is in File management.
Database and configuration#
If the script includes an
.sqlfile, import it into the server's database. The procedure with HeidiSQL is in Database for FiveM.Open
config.lua(orconfig/*.lua) in the editor of the Files tab and go through the settings. Typical options:Option (example) What it usually does Config.Framework = 'esx'Which framework the script is set up for ( esx,qb,qbx). Must match your server.Config.Locale = 'cs'The language of the texts (here Czech), if the script includes that language. Config.Debug = falseDebug output. Keep it falseon a live server.Option names vary from script to script. The author explains exactly what they do in the comments in the file.
Turning the script on#
Add this line to
server.cfg(in CFG Editor if you use txAdmin):server.cfgcfg ensure muj_skriptensure– starts the resource (and restarts it if it's already running).muj_skript– the resource folder name.
Put the line below all of the script's dependencies (framework,
oxmysql,ox_lib). If the script is in a category you already start (ensure [standalone]), you don't need to add the line.Restart the server. Or start the script without a restart, with commands in the console (customer area, or Live Console in txAdmin):
text refresh ensure muj_skriptrefresh– the server scans theresourcesfolder again and finds new resources. Without it, the server doesn't know about the new script.ensure muj_skript– starts it.
Scripts that change player data or add items to inventories are better started by restarting the whole server, not while it's running.
fxmanifest.lua: what's in it#
fx_version 'cerulean'
game 'gta5'
author 'Jan'
description 'Example script'
version '1.0.0'
shared_script 'config.lua'
client_scripts {
'client/*.lua'
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/*.lua'
}
ui_page 'html/index.html'
files {
'html/index.html',
'html/app.js'
}
dependencies {
'oxmysql',
'ox_lib'
}| Entry | What it does |
|---|---|
fx_version 'cerulean' | The manifest format version. cerulean is current. Without fx_version, the server prints a warning. |
game 'gta5' | Which game the resource is for (gta5 = FiveM, rdr3 = RedM). |
author, description, version | Information about the script; they don't affect how it works. |
shared_script | A file loaded both on the server and on the player's side (typically config.lua). |
client_scripts | Scripts that run on the player's side. The player downloads them. *.lua = all .lua files in the folder. |
server_scripts | Scripts that run only on the server. Players never see them. @oxmysql/lib/MySQL.lua loads a library from another resource. |
ui_page, files | The script's web interface (NUI) and the files the player downloads. |
dependencies | Resources that must be running first. The server tries to start them itself, and if one is missing, it doesn't start the script. |
The older lua54 'yes' entry is no longer needed: since June 2025, all scripts run on Lua 5.4.
Dependencies and load order#
- Resources start in the order of the
ensurelines inserver.cfg. - The usual order: standard FiveM resources ›
oxmysql›ox_lib› framework core › framework scripts › your scripts. - The
dependenciesentry in the manifest can also require server conditions, for example'/onesync'(OneSync on),'/server:4500'(minimum server build) or'/gameBuild:h4'(minimum game build). If a condition isn't met, the script won't start.
Paid scripts and Asset Escrow#
Paid scripts from Cfx Marketplace or Tebex are usually protected by Asset Escrow: the code is encrypted and only runs on the buyer's servers.
- The script only runs on a server whose license key belongs to the same Cfx.re account you bought the script with. Download it from the Cfx.re Portal (opens in a new window) or from the link in the email from Tebex.
- Encrypted files can't be edited. The author usually leaves the configuration files (
config.lua) open, and you can edit those. - The resource contains an
.fxapfile. It must be uploaded to the server along with the rest, otherwise the script can't be verified.
Cars, clothing and maps (streamed files)#
Models and textures are “streamed” to players: they download them from the server when they connect. Such a resource usually has a stream folder and references to game data files in its manifest.
fx_version 'cerulean'
game 'gta5'
files {
'data/vehicles.meta',
'data/carvariations.meta',
'data/handling.meta'
}
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
data_file 'HANDLING_FILE' 'data/handling.meta'| Entry | What it does |
|---|---|
stream/ folder | Models and textures (.yft, .ytd, .ydr …). Everything in it is downloaded by players automatically and isn't listed in the manifest. |
files { … } | Data files the player downloads. |
data_file 'VEHICLE_METADATA_FILE' | The vehicle definition (vehicles.meta): the model name for spawning, sound, class. |
data_file 'VEHICLE_VARIATION_FILE' | Vehicle colors and variants (carvariations.meta). |
data_file 'HANDLING_FILE' | Driving characteristics (handling.meta). |
this_is_a_map 'yes' | The resource is a map or interior (MLO). After it starts, the game reloads the map data. |
Practical tips:
- Every car or map adds to the download on first connection. Dozens of cars with high-resolution textures mean long loading times.
- Interiors (MLOs) often require a certain game build (
sv_enforceGameBuild) or another resource with base data. Read the README. - Upload large car and map packs over SFTP; the files are often bigger than 100 MB.
Checking a script before installing it#
A script runs on the server with full access to its data, database and players. Before you start it, check at least:
- Source: the author's official GitHub, the Cfx.re forum, Cfx Marketplace or Tebex. Not random links from Discord.
- Unreadable code in an otherwise open script (long strings of meaningless characters,
load(with downloaded text). Paid scripts are encrypted by Asset Escrow, but a freely available script shouldn't contain code like that. - Sending data elsewhere:
PerformHttpRequestcalls to addresses unrelated to the script. - New admin commands the README doesn't mention.
If FiveM reports prohibited logic for a resource, the resource probably contains malicious code that may have infected other resources too. Remove it and check your other scripts.
Resource performance#
- The server prints
server thread hitch warning: timer interval of … millisecondsin the console when one server tick took longer than 150 ms. An occasional message at startup is fine. Frequent messages while running mean some script is overloading the server. - Find the culprit with the built-in profiler: in the server console, type
profiler record 500(records 500 frames), wait, thenprofiler saveJSON profil.json. The file is saved in the folder the server is started from. Download it in the Files tab and open it in Chrome's developer tools (Performance tab › load profile). - On the player's side, the
resmoncommand in the F8 console shows the load of individual resources. It only works in the client's developer mode (otherwise it saysAccess denied for command resmon).
Commands for working with resources#
| Command | What it does |
|---|---|
refresh | Reloads the list of resources from the folder. Required after uploading a new script. |
ensure <NAME> | Starts a resource, or restarts it if it's running. |
start <NAME> | Starts a resource that isn't running. |
stop <NAME> | Stops a resource. |
restart <NAME> | Restarts a running resource. It won't start a stopped one (Can't restart a stopped resource.). |
Type these commands into the server console without a slash. In txAdmin, you'll find the same thing in graphical form on the Resources page.
Verification#
- After a restart or
ensure, the console shows the lineStarted resource muj_skript. - In txAdmin, the Resources page shows the resource as started.
- The script works in the game and there are no red errors in the client console (F8).
Troubleshooting#
Look up messages you can't find here in Common FiveM server errors.
Couldn't find resource muj_skript.#
The server doesn't know a resource with this name.
- The name in
ensuredoesn't match the folder name (upper and lower case matter; watch out for-main). fxmanifest.luaisn't directly in the folder (doubled folder after extracting).- You uploaded the script while the server was running and didn't run
refresh. - The folder is outside
resources, or in a differentresourcesthan the one the server uses (with txAdmin, it's the deployment folder).
Could not find dependency ox_lib for resource muj_skript.#
A dependency is missing. Install the resource named in the message (ox_lib here) and put its ensure above the script. The message Could not start dependency … means the dependency exists but failed to start itself. Look for its error in the console.
Couldn't start resource muj_skript.#
The resource exists but didn't start. The real reason is usually right above this message in the console: a missing dependency, a manifest error, an unmet condition (OneSync, game build) or a license error.
A warning that the resource has no manifest#
The folder is missing fxmanifest.lua (or the file has a different name, such as fxmanifest.lua.txt from Windows). Check the file name and look for a doubled folder.
SCRIPT ERROR: @muj_skript/server/main.lua:25: … #
An error right in the script's code. After the colon come the file, the line number and a description. The most common causes: the wrong framework setting in config.lua, a missing database table (you didn't import the .sql), an incompatible framework version. You'll see errors on the player's side in the F8 console.
You lack the required entitlement to use muj_skript#
The paid script was bought on a different Cfx.re account than the one the server's license key belongs to. Use a license key from the same account, or transfer the script to the right account on the Portal. Also try restarting the server.
Failed to verify protected resource muj_skript#
The files of the encrypted script are damaged or one is missing, typically .fxap. Upload the whole resource again, including the .fxap file. Some SFTP programs don't transfer hidden files (starting with a dot); turn on showing hidden files in them.
Error parsing script or Failed to load script#
The script uses features of a newer server version. Update the artifacts (guide).
The script's interface (menu, phone, HUD) doesn't show up#
The built web interface is missing. Download the script from the Releases section instead of the source code, or build the interface following the README (npm install and npm run build on your computer) and upload the resulting folder.
Summary
- A resource is a folder with
fxmanifest.lua; the folder name is the resource name. Folders[in brackets]are just categories. - Download the release, extract it, remove
-main, upload it toresources, import the SQL and set upconfig.lua. - Add
ensure nametoserver.cfgbelow all dependencies. Without a restart:refreshandensure namein the console. - Paid scripts (Asset Escrow) only run with a license key from the same Cfx.re account and need the
.fxapfile.