You install FiveM scripts by placing the resource in the resources/ folder, starting it in server.cfg with ensure, and loading dependencies such as ESX, QBCore, or database drivers beforehand. What matters is a clean folder structure, the right start order, a checked SQL import, and a look at the server console after the restart.
Requirements
You need access to the server files, server.cfg, the server console, and, if the script uses database tables, your MySQL or MariaDB database. With a rented FiveM server, this usually includes a file manager, FTP/SFTP, and a database tool such as phpMyAdmin or Adminer. If you are still planning the full server, the internal guide Rent and Set Up a FiveM Server helps with the basic structure.
FiveM technically calls scripts resources. According to the official Cfx.re documentation, fxmanifest.lua describes which files, scripts, and metadata belong to a resource. So always first check whether the unpacked folder contains a valid manifest file. Without a manifest, the server cannot load the resource correctly.
Check the Script Structure
A typical FiveM resource looks like this:
my_script/
├── fxmanifest.lua # Manifest file
├── client.lua # Client code
├── server.lua # Server code
├── config.lua # Configuration
└── html/ # NUI (web interface)
What matters is that you do not accidentally upload an extra wrapper folder. For example, resources/mein_script-main/mein_script/fxmanifest.lua would be wrong if the resource is actually supposed to be directly under resources/mein_script/fxmanifest.lua. After unpacking, open the folder and check the level where fxmanifest.lua is located.
Install the Script
- Download the script
- Unpack it into the
resources/folder - Add it to
server.cfg:
ensure mein_script
- Restart the server
Use exactly the folder name as the resource name, or the name specified by the README. Many errors happen because of different spelling, spaces in the folder name, or special characters. Short names with lowercase letters, hyphens, or underscores are recommended.
Set Up ESX Scripts
ESX scripts depend on the ESX base and required additional resources being started first. The exact order can vary depending on the ESX version and script, so the rule is: check the script README and follow the existing framework documentation.
# ESX base
ensure es_extended
ensure esx_menu_default
ensure esx_menu_dialog
ensure esx_menu_list
# Jobs
ensure esx_policejob
ensure esx_ambulancejob
ensure esx_mechanicjob
ensure esx_taxijob
# Features
ensure esx_banking
ensure esx_vehicleshop
ensure esx_property
If a job script expects its own database tables or items, import the included SQL file before the first production start. Back up the database beforehand. On existing roleplay servers, SQL files can overwrite columns, items, or jobs if they are not adapted to your installation.
Set Up QBCore Scripts
QBCore resources follow a similar principle: first the framework, then shared libraries, then inventory, jobs, garages, phone, or HUD. A simple example:
ensure qb-core
ensure qb-policejob
ensure qb-ambulancejob
ensure qb-garages
ensure qb-inventory
ensure qb-phone
Pay special attention to configuration files such as config.lua, shared/config.lua, or framework-specific item files. Some QBCore scripts expect entries in items, jobs, gangs, or permissions. Only enter values that the script documents. If you want to plan resources, txAdmin, and server operation in a broader context, also read Rent a FiveM Server: Set Up GTA RP, Resources & txAdmin 2025.
Follow the Start Order
The start order is important:
- Framework first (ESX/QBCore)
- Dependencies (oxmysql, etc.)
- Base scripts (inventory, HUD)
- Job scripts
- Cosmetic scripts (emotes, clothing)
Place shared dependencies as centrally as possible and before all dependent resources. If multiple scripts require the same library, it should only be started once. With database connections, the database driver must be running before resources send SQL queries.
Free Script Sources
| Source | Description |
|---|---|
| GitHub | Open-source scripts |
| cfx.re Forum | Community scripts |
| Overextended | High-quality open source |
Only download scripts from sources where the code, changelog, or community feedback is traceable. With unknown downloads, pay particular attention to obfuscated Lua code, unexplained HTTP requests, third-party webhooks, and hard-coded tokens. Install new resources first on a test instance or outside peak play times.
Check the Result
Restart the server and watch the console. A correctly loaded resource appears without manifest, dependency, or SQL errors. In-game, then check exactly the function the script provides: job menu, inventory interaction, marker, command, NUI window, or database change. Test with the roles and permissions that real players will use later.
Use refresh and ensure mein_script in the server console only for controlled tests. For production changes, a clean restart is often more meaningful because it reflects the full start order.
Troubleshooting
SCRIPT ERROR
First check the line in the console. Often a dependency is missing, a config variable is set incorrectly, or an exported function is called before the target resource has started. Compare the error message with the script README.
SQL Errors
Import the included tables or columns if the script requires them. If tables already exist, do not run SQL blindly again. Create a backup and adapt the statements to your existing database structure.
Script Does Not Load
Check the folder name, ensure entry, and fxmanifest.lua. A typo in the manifest file or an incorrectly nested folder is enough to stop the resource from starting.
Function Does Not Appear In-Game
Check permissions, jobs, items, coordinates, and framework version. Many roleplay scripts only work for specific jobs or groups. So do not only test as an admin, but also with a normal player profile.
Checks, Limits, and a Safe Rollback Path
The guide “Installing FiveM Server Scripts - ESX and QBCore” applies to the server type described in the article and the version state visible at the time of review. Menu names, available versions, mod or plugin compatibility, and required resources may differ after updates. So do not transfer values to another game, loader, or server version without checking them.
Before changing the world, savegame, configuration, or extensions, create a backup of the affected files. Then change only one related step and test it with the same client and server version you want to play with later.
| Checkpoint | Expected Result | Abort and Rollback |
|---|---|---|
| Server start | The server reaches the ready state without a new error message. | If start errors occur, revert the change and restore the latest backup. |
| Connection test | A test account can connect via the address shown in the panel. | If version or connection errors occur, compare the version, port, and firewall rules again. |
| Function test | The specifically changed function works without damaging existing world or game data. | If side effects occur, stop the server and restore the backed-up files. |
A successful single test is not a performance or availability guarantee. World size, mods, plugins, player count, network path, and simultaneous load can change the result. Document the version, change, and test result so you can understand later deviations.
FAQ
Do I Have to Restart the Server After Every Script?
For a reliable test, yes. Individual resources can be reloaded via the console, but a full restart shows whether the start order and all dependencies are really correct.
Can I Use ESX and QBCore at the Same Time?
In practice, you should choose one framework. Many scripts are clearly built for ESX or QBCore and each expects different events, tables, and config structures.
What Do I Do If a Script Has No fxmanifest.lua?
Then it may be outdated, incorrectly unpacked, or not prepared for current FiveM resource structures. Check the source and documentation before installing it in production.
Should I Test Free Scripts Directly on the Live Server?
Better not. Test new resources separately first, back up files and the database, and check the console. Especially on roleplay servers, faulty scripts can affect inventory, jobs, or player progress.
How Many Scripts Can a FiveM Server Use?
There is no useful general number. What matters is script quality, dependencies, database load, tick behavior, and player count. Plan resources deliberately and consistently remove unused scripts.