TUTORIALBEGINNERSINSTALLATIONHOW-TOSETUP GUIDESERVER.CFGFIVEM INSTALLATIONSCRIPT SETUPRESOURCE INSTALLATIONSTEP BY STEP March 3, 2026 · 6 min read

How to Install FiveM Scripts — Beginner Guide

So you just set up your FiveM server and you want to add scripts. The process is actually pretty simple once you’ve done it once, but the first time can be confusing because everyone explains it differently.

I’m going to walk you through it the way I’d explain it to someone sitting next to me. No fluff, just the steps.

What You Need Before Starting

  • A working FiveM server (ideally managed through txAdmin)
  • Some way to access your server files — FTP client like FileZilla, or direct access if you’re self-hosting
  • Your server.cfg file
  • A database if the script needs one (most servers already have MySQL or MariaDB set up)

Don’t have a server yet? That’s a whole different thing. Most people start with a VPS from somewhere like OVH or Hetzner and use txAdmin to manage it. But that’s outside the scope of this guide.

Step 1: Get the Script Files

Where you get the script depends on what you’re installing:

Free scripts — Usually hosted on GitHub or the cfx.re forums. Download the ZIP and extract it. You’ll end up with a folder containing the resource files.

Paid scripts from Tebex — After you buy a script, it shows up in your Cfx.re Keymaster under “Granted Assets.” Download it from there. If the script is escrowed (most paid scripts are), you’ll need to link your server’s license key in Keymaster first or it won’t start.

Scripts from our store — Same process. Buy through our Tebex store, grab it from Keymaster, and follow the steps below.

Step 2: Put It in the Right Place

Drop the script folder into your server’s resources directory. Here’s what the file structure looks like:

server-data/
├── resources/
│   ├── [esx]/              ← framework stuff
│   ├── [standalone]/       ← standalone scripts
│   └── ybn_myscript/       ← your new script
├── server.cfg

Most servers organize resources into subfolders like [esx], [qb], [standalone], etc. You can put scripts in these folders — FiveM will scan subdirectories automatically.

Two things to watch out for:

  1. Don’t rename the folder unless the script’s docs say you can. The folder name is the resource name, and some scripts reference their own name internally.
  2. No spaces in folder names. Ever. Use underscores or hyphens.

Step 3: Add It to server.cfg

Open server.cfg and add an ensure line:

ensure ybn_myscript

Load order matters. Your framework needs to load before scripts that depend on it. Here’s a typical order:

# Database
ensure oxmysql

# Framework (pick one)
ensure es_extended    # ESX
# ensure qb-core     # QBCore

# Common dependencies
ensure ox_lib
ensure ox_inventory

# Your scripts (after everything they depend on)
ensure ybn_myscript

If you get “no such export” errors, it almost always means something loaded before its dependency. Move the ensure line lower.

Step 4: Import the SQL File (If There Is One)

A lot of scripts come with a .sql file that creates database tables. You need to run this against your database before the script will work properly.

phpMyAdmin: Open your database → Import tab → select the file → hit Go.

HeidiSQL: Connect → File → Run SQL file → select it → execute.

Command line:

mysql -u root -p your_database < myscript.sql

If the file uses CREATE TABLE IF NOT EXISTS, it’s safe to run more than once. If it doesn’t, only run it once or you’ll get errors about tables already existing.

Step 5: Configure It

Most scripts have a config.lua or shared/config.lua with settings you can tweak — framework selection (usually auto-detected these days), prices, permissions, feature toggles, etc.

Read through it before starting the server. Good scripts have comments explaining every option. If the config file looks like uncommented spaghetti… that’s a red flag about the script’s quality in general.

Step 6: Start It Up

Restart your server, or if you don’t want to kick everyone:

  1. Run refresh in the txAdmin console (rescans the resources folder)
  2. Run ensure ybn_myscript to start just that resource

Watch the console output for errors.

Stuff That Goes Wrong (And How to Fix It)

“SCRIPT ERROR: @scriptname/…” A dependency is missing. Check the script’s README or documentation for required resources (ox_lib, ox_inventory, etc.) and make sure they’re installed and ensured before this script.

“No such export…” Load order problem. The script is calling a function from another resource that hasn’t loaded yet. Move the dependency’s ensure line above this script in server.cfg.

Database errors on startup Either you forgot to import the SQL file, or your database connection string is wrong. Check set mysql_connection_string in your server.cfg. Common mistake: wrong port, wrong password, or the database name doesn’t match.

Escrowed script won’t start Your server’s CFX license key doesn’t match the one you assigned in Keymaster. Log into Keymaster, find the asset, and make sure the key matches. Also check that the asset hasn’t expired if it’s subscription-based.

Script starts but nothing happens in-game Check the framework version. Some newer scripts require recent versions of ESX Legacy or QBCore. If you’re running a framework version from 2024, it might be too old. Update your framework first, then try again.

“attempt to index a nil value” This usually means the script expected a value that doesn’t exist — often a database column that wasn’t created because the SQL wasn’t imported, or a config value that’s missing. Check both.

You’re Good to Go

That’s genuinely it. Download, drop in folder, ensure, import SQL, configure, restart. After you’ve done it two or three times it becomes second nature.

If you want scripts that make this process as painless as possible, check our store — everything we sell auto-detects your framework and comes with clear documentation.

Got stuck? Join our Discord and ask in the support channel. We help with installation questions daily.

YBN
YBN Scripts
FiveM script developer at YBN. Building premium ESX, QBCore & Qbox resources.

Related Posts

Need scripts for your server?

Check out our premium FiveM resources — ESX, QBCore & Qbox supported.

Browse Premium Scripts → Free Scripts →