All Posts
June 28, 2026ModForge Team

How to Install FiveM Scripts: A Complete Step-by-Step Guide

Bought or downloaded a FiveM script and not sure how to install it? This complete guide walks through every step from extracting files to testing in-game — including common errors.

Installing a FiveM script for the first time can be confusing. Where exactly do the files go? What is a SQL file and why does it matter? Why is the script not showing up in-game after you added it? This guide covers the entire process so your scripts work correctly every single time.

Before You Touch Anything: Read the Documentation

Before installing any script, spend five minutes reading the README or documentation included with it. Most installation failures are caused by skipping this step.

Specifically look for:

  • Framework requirement — ESX or QBCore, and which version
  • Dependencies — other resources this script requires to be installed first (e.g. ox_inventory, ox_lib, qb-menu)
  • SQL file — whether the script needs database tables created
  • Items list — new items that need to be registered with your inventory system
  • Config notes — values you must change before the script will work

Do not skip this. A two-minute read saves hours of debugging.


Step 1: Extract and Inspect the Files

Scripts are almost always delivered as a .zip archive. Extract the contents to a temporary folder first and look at what is inside before copying anything to your server.

A typical well-structured script folder contains:

my-script/
├── client/
│   └── main.lua
├── server/
│   └── main.lua
├── shared/
│   └── config.lua
├── fxmanifest.lua
├── my-script.sql
└── README.md

The fxmanifest.lua file is the most important one — it must exist at the root of the resource folder. If it is inside a subfolder (like a release/ or dist/ wrapper folder), copy the inner folder, not the outer one.


Step 2: Copy to the Resources Directory

Copy the entire script folder into your server's resources directory:

server-data/resources/[scripts]/your-script-name/

The folder name matters. It must match exactly what you write in server.cfg. Keep folder names lowercase and use hyphens instead of spaces (my-police-job, not My Police Job).


Step 3: Import the SQL File (Critical Step)

If the script includes a .sql file, you must import it into your database before starting the server. Scripts that require SQL tables will either throw errors on startup or fail silently without them.

Command line:

mysql -u root -p your_database_name < your-script-name.sql

HeidiSQL:

  1. Open HeidiSQL and connect to your MySQL server
  2. Select your FiveM database in the left panel
  3. File → Run SQL File → select the .sql file
  4. Click Open and wait for it to complete
  5. Check that the output panel shows no red errors

Step 4: Configure config.lua

Open config.lua (or shared/config.lua) in a text editor. This is where you customize the script for your specific server. Pay close attention to:

Job names — must match exactly what is in your framework config or database:

Config.PoliceJob = 'police'  -- must match your job name exactly, case-sensitive

Item names — must match items registered in your inventory system:

Config.WeaponItem = 'weapon_pistol'  -- must exist in items.lua

Notification system — set to match the notification script your server uses:

Config.Notify = 'qb'  -- or 'okok', 'mythic', 'esx', etc.

Framework version — some scripts support multiple versions:

Config.Framework = 'qbcore'  -- or 'esx'

A single incorrect job name or item name is enough to break the entire script at runtime.


Step 5: Register New Items

If the script adds new items (food, weapons, tools, drugs), register them with your inventory system before launching:

For ox_inventory, add to ox_inventory/data/items.lua:

['lockpick'] = {
    label  = 'Lockpick',
    weight = 200,
    stack  = true,
    close  = true,
},

For QBCore, add to qb-core/shared/items.lua:

['lockpick'] = {
    name        = 'lockpick',
    label       = 'Lockpick',
    weight      = 200,
    type        = 'item',
    image       = 'lockpick.png',
    unique      = false,
    useable     = true,
    shouldClose = true,
    description = 'A lockpick'
},

Also add the item image (lockpick.png) to ox_inventory/web/images/ if you are using ox_inventory.


Step 6: Add to server.cfg

Open server.cfg and add a line to start the resource:

ensure your-script-name

Position matters. Place it after all resources it depends on:

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure ox_inventory
ensure your-script-name    ← here, after its dependencies

Step 7: Restart the Server and Check the Console

Start or restart your server and watch the console output. A successful resource start shows:

[your-script-name] Started

A failed start shows something like:

ERROR: your-script-name: client/main.lua:42: attempt to index a nil value (global 'QBCore')

Read the error carefully. It tells you the file name, line number, and exactly what failed.


Common Error Messages Explained

Could not find resource 'script-name' — The folder name on disk does not match the name in server.cfg. Check spelling, capitalization, and that fxmanifest.lua is at the root of the folder.

attempt to index a nil value (global 'QBCore') — QBCore is not loading before this script. Fix the load order in server.cfg.

You have an error in your SQL syntax — The SQL file failed to import. Open it manually in HeidiSQL, run it there, and read the specific error line.

No such export 'getPlayerData' in resource 'qb-core' — You have an outdated version of QBCore or the script. Update both.

Couldn't find item 'itemname' — The item is not registered in your inventory system's items config. Add it.


Step 8: Test In-Game

Join your server and test the script's primary function. If it is not working as expected:

  1. Press F8 in-game to open the client console — look for red error lines
  2. Check the server console for new errors that appeared when you triggered the script
  3. Confirm you have the correct job, items, or permissions the script requires to function
  4. Re-read the config and documentation and verify every value matches your server setup

Scripts purchased on ModForge come with documentation and direct seller support. Browse quality verified scripts at modforge.xyz.