background image
Game Servers 380 7 Days to Die 4 Abiotic Factor 2 Aloft 2 alt:V 2 Americas Army Proving Grounds 2 Among Us 2 Archean 2 ARK Survival Ascended 6 ARK Survival Evolved 3 Arma 3 3 Arma Reforger 2 Aska 2 AssaultCube 2 Assetto Corsa 3 Astro Colony 2 Astroneer 2 Automobilista 2 2 Avorion 2 Banana Shooter 2 Barotrauma 3 BATTALION Legacy 2 BeamNG.drive (BeamMP) 2 Black Mesa 2 Brickadia 2 Call of Duty 2 Citadel: Forged with Fire 2 ClassiCube 2 Clone Hero 2 Colony Survival 2 Conan Exiles 4 Contagion 2 Core Keeper 2 Counter-Strike 2 3 Craftopia 2 CryoFall 2 CS2D 2 Cube 2: Sauerbraten 2 Cubic Odyssey 2 DayZ 4 DDNet 2 DDRaceNetwork 2 Dead Matter 2 Dont Starve Together 4 Eco 2 Empyrion Galactic Survival 2 Enshrouded 3 Escape from Tarkov 2 Euro Truck Simulator 2 2 Factorio 2 Farming Simulator 25 2 Fistful of Frags 2 FiveM 3 FortressCraft Evolved 2 Foundry 2 Foundry VTT 2 Frozen Flame 2 FTL Tachyon 2 Garrys Mod 3 Ground Branch 2 Half-Life 2 Deathmatch 2 Hogwarp 2 Holdfast: Nations at War 2 HumanitZ 2 Hurtworld 2 Hytale 1 Icarus 2 Insurgency Sandstorm 2 IOSoccer 2 Just Cause 3 Multiplayer 2 Kerbal Space Program 2 Killing Floor 2 3 LeagueSandbox 2 Left 4 Dead 2 Left 4 Dead 2 3 Longvinter 2 Los Angeles Crimes 2 Medal of Honor 2 Midnight Ghost Hunt 2 Mindustry 2 Minecraft 4 Minetest 2 Modiverse 2 Mordhau 3 Mount & Blade II: Bannerlord 2 Myth of Empires 2 Nazi Zombies Portable 2 Necesse 2 NeosVR 2 Neverwinter Nights EE 2 Night of the Dead 2 Nightingale 2 No Love Lost 2 No More Room in Hell 2 No One Survived 2 Nova-Life Amboise 2 Nuclear Option 2 Onset 2 Open Fortress 2 OpenArena 2 OpenRA 2 OpenRCT2 2 OpenTTD 2 Operation Harsh Doorstop 2 Palworld 3 Path of Titans 2 Pavlov VR 3 PixARK 2 Plains of Pain 2 Portal Knights 2 Post Scriptum 2 Project Zomboid 8 Puck 2 Quake Live 2 R5Reloaded 2 RedM 2 Renown 2 Resonite 2 Return to Moria 2 Rimworld Together 2 Rising World 2 Risk of Rain 2 1 Rust 4 Satisfactory 1 SCP Secret Laboratory 3 SCUM 2 Smalland 2 Solace Crafting 2 Soldat 2 Soldat 2 2 Sonic Robo Blast 2 2 Sons of the Forest 2 Soulmask 2 SourceCoop 2 Space Engineers 3 Space Station 14 2 Squad 3 Starbound 3 StarMade 2 Stationeers 2 Stormworks 2 Subnautica Nitrox 2 Sunkenland 2 SuperTuxKart 2 Sven Co-op 2 Swords 'n Magic and Stuff 2 Team Fortress 2 3 Teeworlds 2 Terraria 3 TerraTech Worlds 2 TF2 Classified 2 The Forest 3 The Front 2 The Isle 2 Tower Unite 2 Trackmania 2 Unturned 4 Urban Terror 2 V Rising 3 Valheim 3 VEIN 2 Veloren 2 Vintage Story 3 Voyagers of Nera 2 Wolfenstein: Enemy Territory 2 Wreckfest 2 Wurm Unlimited 2 Xonotic 2 Zandronum 2 Getting Started 2 Network & Connectivity 1 Server Management 2
Категории

FiveM Resources, Scripts, and Database Setup

Доступно на: ESPAÑOL PORTUGUÊS (BRASIL)

This guide covers how to install resources (scripts) on your FiveM server, set up a MySQL database for frameworks like ESX or QBCore, and understand resource load order. If you have not yet completed initial server setup, start with the FiveM Server Setup Guide first.

Prerequisites: You should have a running FiveM server with TXAdmin configured and a working server.cfg. See the FiveM Server Setup Guide for initial setup steps.

Installing Resources and Scripts

FiveM servers are extended with resources (also called scripts). Resources add features like car dealers, jobs, HUD elements, frameworks, and more.

How to Install a Resource

  1. Download the resource from its source (GitHub, Cfx.re forums, Tebex, etc.).
  2. Extract the resource folder from the ZIP/archive if needed.
  3. Upload the resource folder to your server's resources/ directory using the GPanel Files tab or via SFTP.
  4. Open server.cfg and add an ensure line for the resource:
# Add your custom resources
ensure my-new-resource
  1. Restart the server from GPanel or TXAdmin for the resource to load.
Resource folder names matter. The name in the ensure line must exactly match the resource folder name (case-sensitive). If the folder is my-cars, the line must be ensure my-cars.

Resource Manifests

Every valid resource must contain a manifest file. Modern resources use fxmanifest.lua, while older ones use __resource.lua. If a downloaded resource folder does not contain either of these files, the resource will not load. Some downloads nest the actual resource folder inside an outer folder — make sure the folder you place in resources/ is the one that contains the manifest.

Resource Load Order

Resources load in the order they appear in server.cfg. If a resource depends on another (for example, a job script that depends on a framework like ESX or QBCore), ensure the dependency is listed before the resource that needs it:

# Database resource first
ensure oxmysql

# Framework second
ensure es_extended

# Then resources that depend on the framework
ensure esx_basicneeds
ensure esx_jobs
ensure esx_vehicleshop
Load order errors are a common cause of crashes. If a resource tries to call a framework that has not loaded yet, it will fail. Always place dependencies above the resources that need them.

Organising Resources with Category Folders

You can organise resources into subfolders inside the resources/ directory. Use bracket notation in server.cfg to ensure an entire category folder:

# Ensure all resources inside resources/[esx]/
ensure [esx]

# Ensure all resources inside resources/[standalone]/
ensure [standalone]

This loads every resource within the named subfolder. It is a convenient way to group related scripts without listing each one individually.

Hot-Loading Resources via TXAdmin

You do not always need a full server restart to load a new resource. TXAdmin can start, stop, and restart individual resources from its Resources page. After uploading a new resource and adding its ensure line, you can run the following command in the TXAdmin live console:

refresh
ensure my-new-resource

The refresh command tells the server to rescan the resources/ directory for new entries.

Database Setup (MySQL / MariaDB)

Many FiveM frameworks and resources (such as ESX, QBCore, or vRP) require a MySQL or MariaDB database. Legion Hosting provides database credentials with your server.

Finding Your Database Credentials

  1. In GPanel, go to the Databases tab.
  2. If no database exists yet, click New Database to create one.
  3. Note down the following details:
    • Database Host (address and port)
    • Database Name
    • Username
    • Password (click the eye icon to reveal it)

Configuring the Database Connection

Database connection details are set in server.cfg using a connection string. The exact format depends on which MySQL resource you are using, but the most common format is:

# MySQL connection string (oxmysql / mysql-async format)
set mysql_connection_string "mysql://USERNAME:PASSWORD@HOST:PORT/DATABASE_NAME?charset=utf8mb4"

Replace the placeholders with your actual credentials from the Databases tab. For example:

set mysql_connection_string "mysql://u123_fivem:[email protected]:3306/s123_fivem?charset=utf8mb4"
Do not use localhost. Since the database server is separate from the game server, you must use the full database host address shown in GPanel — not localhost or 127.0.0.1.
Special characters in passwords: If your database password contains characters such as @, #, or %, you must URL-encode them in the connection string. For example, @ becomes %40 and # becomes %23.

Choosing a MySQL Resource

Resource Status Notes
oxmysql Recommended Modern, actively maintained, best performance. Used by most current frameworks.
mysql-async Legacy Older but still works. Some older scripts depend on it specifically.
ghmattimysql Legacy Another older option. Check your framework's documentation if it requires this.

Whichever MySQL resource you use, it must be ensured in server.cfg before any resources that depend on it:

# Database connection
set mysql_connection_string "mysql://USERNAME:PASSWORD@HOST:PORT/DATABASE_NAME?charset=utf8mb4"

# MySQL resource — must load before framework
ensure oxmysql

# Framework
ensure es_extended

Framework Basics

A framework provides the core gameplay systems that other resources build on — things like player identity, money, inventory, jobs, and vehicles. The two most popular FiveM frameworks are:

Framework Resource Name Description
ESX es_extended The most widely used framework. Large ecosystem of free and paid scripts. Good for roleplay servers.
QBCore qb-core Modern alternative to ESX. Cleaner codebase, active development. Growing script ecosystem.
Do not mix frameworks. ESX scripts will not work on a QBCore server and vice versa. Choose one framework and ensure all your resources are compatible with it.

Most frameworks are installed via TXAdmin's recipe system during initial setup. If you chose a recipe like "QBCore" or "ESX" during TXAdmin setup, the framework and its core dependencies are already installed. If you need to install a framework manually, follow its official documentation:

Getting Help

If you need assistance with resource installation or database configuration:

  1. Check the resource's documentation or GitHub page for installation instructions and known issues.
  2. Review the GPanel console or TXAdmin logs for error messages.
  3. Open a support ticket at https://legionhosting.net/submitticket.php with your error messages and the name of the resource you are trying to install.

Related Articles


Была ли эта статья полезной?

Ready to Get Started?

The servers are booted, select your plan and become our latest satisfied client.