Guide Β·
How to Install FiveM Scripts on ESX, QBCore and QBox (Step by Step)
Install any FiveM script the right way: folder names, the resources folder, dependencies, SQL files, server.cfg ensure order and the console errors that tell you what went wrong.
Installing a FiveM script takes about two minutes once you know the routine. Almost every "the script does nothing" problem comes from one of four things: a wrong folder name, a missing dependency, a skipped SQL file or the wrong start order in server.cfg. This guide walks through all of them, for ESX, QBCore and QBox alike.
1. Download the script
Free scripts usually come from GitHub. Paid scripts are delivered through the Cfx.re Portal (formerly Keymaster) at portal.cfx.re under Assets β Granted Assets. Download the archive and extract it somewhere temporary first, not straight into your server.
2. Check the folder name
Open the extracted folder. The folder you put on the server is the one that directly contains `fxmanifest.lua`. Two classic mistakes:
- GitHub downloads add
-mainor-masterto the name (ox_lib-main). Rename it back toox_lib, because other scripts look for the dependency by its exact name. - Some archives have a folder inside a folder (
my_script/my_script/fxmanifest.lua). Use the inner one.
3. Put it in the resources folder
Copy the folder into your server's resources directory. Folders wrapped in square brackets are categories, and FiveM scans them automatically, so you can keep things tidy:
resources/
[core]/
es_extended/
oxmysql/
ox_lib/
[scripts]/
my_new_script/
fxmanifest.lua
config.lua
client/
server/The brackets only group folders. You never write them in server.cfg.
4. Install the dependencies
Open fxmanifest.lua and look for a dependencies block, then read the script's README or docs. Most modern scripts need some of these:
| Dependency | What it does |
|---|---|
| oxmysql | Database connection for every script that saves data |
| ox_lib | UI (menus, notifications, progress bars) and helpers |
| ox_target or qb-target | "Look at it and press a key" interactions |
| ox_inventory | Items, if the script gives or takes items |
Each dependency must be installed and started before the script that needs it.
5. Import the SQL file
If the archive has a .sql file, the script stores data in your database. Open HeidiSQL (or phpMyAdmin), select your server's database and run the file. Skipping this step gives errors like Table 'esx.something' doesn't exist in the server console.
6. Add it to server.cfg
Add an ensure line with the exact folder name, below the framework and dependencies:
ensure oxmysql
ensure ox_lib
ensure es_extended
ensure ox_target
ensure ox_inventory
ensure my_new_scriptIf your server.cfg already has ensure [scripts], every folder in that category starts automatically and you do not need a separate line, but the category itself must come after your framework.
7. Start it without a full restart
In the server console (or the txAdmin live console) run:
refresh
ensure my_new_scriptrefresh makes the server notice new folders. Scripts that register items, jobs or database tables are safer to test with a full restart.
8. Read the console
Errors appear in two places: the server console for server-side code and F8 in-game for client-side code. The ones you will meet most often:
| Error | Fix |
|---|---|
Couldn't find resource my_script | Folder name and ensure name differ, or you skipped refresh |
Could not find dependency ox_lib | Dependency missing or renamed (ox_lib-main) |
attempt to index a nil value (global 'ESX') | Script started before the framework, or it is made for a different framework |
No such export ... in resource ... | Wrong version of a dependency, or the dependency failed to start |
You lack the required entitlement | Escrow: wrong account or license key |
Want scripts that install in two minutes?
Every SleepyCode resource has a full installation page in our documentation that lists its dependencies up front. Browse the FiveM scripts or start with the free ones.
Every script for ESX and QBCore, in one place.
Browse scripts