Adding a script to FiveM is not just dropping a folder onto the server and restarting. Scripts run as resources in FiveM, and for a resource to work it must sit in the right folder, carry a valid fxmanifest.lua, have its dependencies loaded before it, and — where required — have its database tables imported. If any one of those four is missing, the script either silently does nothing or floods your console with errors. This guide walks through installing scripts on ESX and QBCore from scratch, debugging included.
In FiveM everything is a resource: your framework, maps, vehicle models, the inventory system and that job script you just downloaded. A resource is simply a folder containing at least an fxmanifest.lua file.
That file tells the server which game it targets, which files run on the client, which run on the server, and which resources it depends on. A typical manifest declares:
fx_version 'cerulean' — the API versiongame 'gta5' — the target gameclient_scripts { 'client/*.lua' } — files that run client-sideserver_scripts { '@oxmysql/lib/MySQL.lua', 'server/*.lua' } — files that run server-sideshared_scripts { 'config.lua' } — files loaded on both sidesdependencies { 'es_extended', 'ox_lib' } — dependenciesIf a folder has no fxmanifest.lua, the server does not treat it as a resource — it prints a warning and moves on. That accounts for a good share of "I uploaded the script and nothing happened" reports.
The first thing to verify is which framework the script was written for. An inventory script built for ESX will not work on a QBCore server — and even if it loads, it cannot read player data. Script pages normally carry one of these labels: ESX, QBCore, Qbox or Standalone. Standalone scripts are framework-independent and run anywhere.
Second check: the README.md inside the archive. Dependencies are listed there, and skipping it is how people lose an afternoon.
Place the script folder in your server's resources directory. A tidy server uses category folders:
server-data/resources/[scripts]/script-name/
Folders in square brackets ([scripts], [esx], [maps]) are categories in FiveM. You can start everything inside one with a single line: ensure [scripts].
Three rules that matter:
bank-system, not bank system.MyScript and myscript are two different things. A config that works on Windows can throw "Could not find resource" on Linux.If extracting produces a nested folder (for example script-name/script-name/fxmanifest.lua), move the inner folder up. fxmanifest.lua must sit directly inside the resource folder.
If the script stores player data — banking, inventory, housing, vehicles — the archive includes a .sql file. Without importing those tables the script will not function.
Via phpMyAdmin: select your database → Import tab → choose the file → Go.
Via command line: mysql -u user -p database < script.sql
Back up your database first. Some SQL files contain DROP TABLE statements and can wipe existing tables — which means losing all your player data.
Database access in FiveM goes through oxmysql. If it is installed, your server.cfg should contain a line like:
set mysql_connection_string "mysql://user:password@localhost:3306/database"
The DSN format works too:
set mysql_connection_string "user=user;password=password;host=localhost;port=3306;database=database"
Two practical notes: if your password contains ; , / ? : @ & = + $ # the connection may break — switch to the other format or simplify the password. And oxmysql must be started at the very top of your resource list.
This is where most installations go wrong. FiveM loads resources in the order they appear in server.cfg, and a script must come after everything it depends on.
The correct order is:
ensure oxmysql — the database layer, before anything elseensure ox_lib — the common helper libraryensure es_extended (ESX) or ensure qb-core (QBCore) — the frameworkensure [scripts] or individual ensure script-name lines — your scriptsThe difference between ensure and start: start only launches a resource, while ensure restarts it if it is already running. Always use ensure in your server config.
Add one script at a time and restart. Adding five at once makes it far harder to work out which one broke.
Most scripts ship with config.lua or shared/config.lua. What usually needs adjusting: framework selection ('esx' / 'qb'), locale, job names, coordinates and prices.
If the framework setting is wrong, the script starts cleanly but does nothing — because it cannot reach player data. When commands do not respond, this is the first place to look.
Restart the server or run restart script-name in the console. Then check two places:
Do not guess before reading the error. FiveM's output usually names the file and line number and points straight at the problem.
The installation steps are identical on both, but a few differences are worth knowing.
On ESX: the framework resource is called es_extended. Scripts reach the player object through calls like ESX.GetPlayerFromId(). Function names changed between the older (1.1) and current (Legacy) versions, so check which one your script targets — if it does not say "ESX Legacy compatible", it may be written for the old version and will throw nil value errors.
On QBCore: the framework resource is qb-core and most official scripts carry the qb- prefix (qb-inventory, qb-banking). QBCore's scripts are more tightly coupled than ESX's; replacing the inventory script may force you to update everything that depends on it.
Common ground: both frameworks now lean on the ox_lib and oxmysql ecosystem. Most modern scripts list them as dependencies, so if they are not installed yet, install them first.
server.cfg. Check letter case on Linux, and confirm the folder really is under resources.ensure es_extended above it..sql file was not imported, or went into the wrong database.config.lua is wrong, or permissions are not defined.ensure line with #, boot cleanly, and read the console logs.resmon in the console to find the resource eating time. Usually a single badly written script slows the whole server.Files from free script sites are not always innocent. Backdoored scripts are a persistent problem in the FiveM ecosystem — they can grant remote command execution on your server, let someone mint in-game money, or leak your database.
Before installing, look for: PerformHttpRequest calls to unknown addresses, encrypted blocks executed through load() or assert(load(...)), and absurdly long base64 strings. If you see any of these, do not install the script.
For general server hardening, see our guide on the first 10 steps to secure your server. We covered the equivalent process on the MTA side in how to add scripts to an MTA server.
Adding scripts is easy; running dozens of them smoothly is a hardware problem. Because the FiveM main loop runs largely on a single core, you want high clock speed — and NVMe storage so SQL queries return without lag. Nubitro's FiveM server packages come with instant setup, 200 Tbps+ DDoS protection and 24/7 support. If you want full control, look at our AMD Ryzen 9 based VDS options. If you have not set up your server yet, start with how to set up a FiveM server.
Check three things in order: is the folder actually under resources, is fxmanifest.lua directly inside it, and is the ensure line in server.cfg spelled correctly. If all three are fine, read the red lines in the console.
No. The frameworks store player data, jobs and currency differently. Some scripts support both — you can tell from the framework option in config.lua. If it does not, you need a bridge resource or you have to adapt the script yourself.
start launches a resource and does nothing if it is already running. ensure starts it if stopped and restarts it if running. Always prefer ensure in server.cfg.
Back up the current folder and your database first. Extract the new version and migrate your config.lua settings into the new file — do not copy the old config over wholesale, since new versions often add options. If the release notes mention SQL changes, import that file too.
There is no hard limit; your hardware and script quality are the limit. A hundred lightweight scripts can cost less than ten badly written ones. The metric is not the count but the millisecond figures in resmon.
Open the files and search for suspicious patterns like PerformHttpRequest, load(, and long base64 blocks. Do not trust free scripts containing obfuscated (non-escrow) code. Where possible, try the script on a test server first.
fxmanifest.lua.server.cfg is critical: oxmysql → ox_lib → framework → your scripts.