Logo

How to Install Resources/Scripts on FiveM

How to Install Resources/Scripts on FiveM

This guide explains how to install, configure, and manage resources (scripts) on your FiveM server safely and optimally.

How to Install Resources/Scripts on FiveM

What is a FiveM Resource?

A resource is a script or set of files that adds functionality to your server:

  • Lua scripts (game logic)
  • JavaScript files (interface)
  • HTML/CSS (menus, interfaces)
  • Configuration files
  • Assets (sounds, textures, models)

Types of Resources

Standalone Resources

Work independently, without dependencies:

  • Simple scripts
  • Basic menus
  • Administrative tools

Resources with Dependencies

Require other resources to function:

  • ESX scripts (require es_extended)
  • QBCore scripts (require qb-core)
  • Scripts using libraries (oxmysql, PolyZone, etc.)

Prerequisites

  • Working FiveM server
  • FTP or file manager access
  • MySQL database (for some resources)
  • Knowledge of the framework used (ESX, QBCore, or standalone)

Step 1: Download a Resource

Reliable Sources

Recommended sites:

  • GitHub (official repositories)
  • FiveM Forums: https://forum.cfx.re/
  • Tebex (paid scripts)
  • GTA5-Mods (with caution)

⚠️ Avoid:

  • Suspicious download sites
  • "Nulled" or "leaked" scripts (backdoor risks)
  • Unknown sources without visible code

Check Compatibility

Before downloading, verify:

  • Framework: ESX, QBCore, Standalone?
  • Version: Compatible with your server version?
  • Dependencies: What other resources are needed?
  • Update date: Is the script maintained?

Step 2: Prepare the Files

Resource Structure

A typical resource contains:

resource_name/
├── fxmanifest.lua        # Main configuration file
├── client/               # Client-side scripts
│   └── main.lua
├── server/               # Server-side scripts
│   └── main.lua
├── config.lua            # Customizable configuration
├── locales/              # Translations
│   ├── en.lua
│   └── fr.lua
├── html/                 # Interface (if applicable)
│   ├── index.html
│   ├── style.css
│   └── script.js
└── stream/               # Assets (sounds, textures)

Check fxmanifest.lua

Open the fxmanifest.lua file to see information:

fx_version 'cerulean'
game 'gta5'

author 'Author Name'
description 'Script description'
version '1.0.0'

-- Dependencies
dependencies {
    'es_extended',      -- Requires ESX
    'oxmysql'          -- Requires oxmysql
}

-- Loaded scripts
shared_scripts {
    'config.lua'
}

client_scripts {
    'client/*.lua'
}

server_scripts {
    'server/*.lua'
}

Step 3: Install the Files

Method 1: Via FTP

  1. Connect to your FTP server
  2. Go to the resources/ folder
  3. Create a folder for the resource (e.g., [custom]/)
  4. Upload the complete resource folder
  5. Verify the structure is intact

Method 2: Via File Manager

  1. Log in to your game panel
  2. Go to Files or File Manager
  3. Navigate to resources/
  4. Upload the ZIP file
  5. Extract it directly on the server

Organize your resources by category:

resources/
├── [essential]/          # System resources
│   ├── spawnmanager/
│   └── sessionmanager/
├── [esx]/               # ESX resources
│   ├── es_extended/
│   └── esx_skin/
├── [qb]/                # QBCore resources
│   ├── qb-core/
│   └── qb-spawn/
├── [standalone]/        # Independent scripts
│   ├── progressBars/
│   └── notification/
├── [jobs]/              # Job scripts
│   ├── esx_policejob/
│   └── esx_ambulancejob/
└── [custom]/            # Custom scripts
    └── my_script/

Step 4: Database Configuration

Check if Database is Needed

Look in the resource for:

  • .sql file in the folder
  • sql/ folder with SQL files
  • Mention in the README

Import the SQL File

  1. Open phpMyAdmin or your MySQL manager
  2. Select your database
  3. Click Import
  4. Select the .sql file
  5. Click Execute

Example SQL file:

CREATE TABLE IF NOT EXISTS `my_script` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `identifier` varchar(60) NOT NULL,
    `data` longtext,
    PRIMARY KEY (`id`)
);

Verify Import

After import, verify tables are created:

  • Go to the Structure tab
  • Check that new tables appear

Step 5: Configure the Resource

Edit config.lua

Open the config.lua file and customize:

Config = {}

-- Language
Config.Locale = 'en'

-- Framework
Config.Framework = 'ESX' -- or 'QBCore' or 'Standalone'

-- Locations
Config.Locations = {
    vector3(123.45, -678.90, 30.0),
    vector3(234.56, -789.01, 25.0)
}

-- Options
Config.EnableNotifications = true
Config.MaxDistance = 50.0
Config.PriceMultiplier = 1.0

-- Items
Config.RequiredItem = 'phone'
Config.RewardItem = 'money'

Common Parameters

Positions:

Config.Position = vector3(x, y, z)
Config.Heading = 90.0

Items and money:

Config.Price = 5000
Config.RequiredItems = {
    {item = 'phone', count = 1},
    {item = 'money', count = 100}
}

Jobs (for ESX/QBCore):

Config.AuthorizedJobs = {
    'police',
    'ambulance',
    'mechanic'
}

Step 6: Add to server.cfg

Basic Syntax

Add the resource in server.cfg:

ensure resource_name

Execution Order

Important: Respect dependency order:

# 1. System resources
ensure spawnmanager
ensure sessionmanager
ensure mapmanager

# 2. Libraries
ensure oxmysql
ensure pma-voice

# 3. Framework
ensure es_extended  # or qb-core

# 4. Framework dependencies
ensure esx_skin
ensure esx_identity

# 5. Custom scripts
ensure my_script

Startup Options

ensure (recommended):

ensure my_script  # Starts and restarts automatically

start:

start my_script   # Starts once only

stop:

stop my_script    # Disables the resource

Step 7: Install Dependencies

Common Dependencies

oxmysql (database):

PolyZone (zones):

progressBars (progress bars):

pma-voice (voice):

Check Dependencies in fxmanifest

dependencies {
    'es_extended',       # ESX Framework
    'oxmysql',          # Database
    'progressBars',     # Progress bars
    'PolyZone'          # Zones
}

Install each dependency before the main resource.

Step 8: Test the Resource

Start the Server

  1. Save all modified files
  2. Restart the server completely
  3. Monitor the console for errors

Check Logs

In the server console, look for:

Success:

Started resource my_script

Errors:

Error loading script server/main.lua
Failed to start resource my_script

Test Commands

In F8 console (client) or server console:

restart my_script     # Restart the resource
stop my_script        # Stop the resource
start my_script       # Start the resource
refresh               # Reload resource list

Common Troubleshooting

Resource Won't Start

Possible causes:

  • Missing dependencies
  • Syntax error in files
  • Wrong order in server.cfg
  • Corrupted files

Solutions:

  1. Check logs for exact error
  2. Install all dependencies
  3. Verify fxmanifest.lua
  4. Re-download resource if necessary

"Failed to load script" Error

Cause: Lua syntax error in scripts

Solution:

# Check syntax
luac -p client/main.lua
luac -p server/main.lua

Fix syntax errors in files.

Database Not Connected

Symptoms:

Error executing query: Table doesn't exist
MySQL connection failed

Solutions:

  1. Check oxmysql in server.cfg
  2. Import SQL file
  3. Verify MySQL connection in server.cfg

Conflict Between Resources

Symptoms:

  • Commands no longer work
  • Menus won't open
  • Errors in console

Solutions:

  1. Disable resources one by one
  2. Identify problematic resource
  3. Check key/command conflicts
  4. Use compatible versions

Security During Installation

Check the Code

Before installing, check for:

Backdoors:

-- DANGEROUS
ExecuteCommand('add_ace identifier.steam:xxx group.admin')
AddEventHandler('give_money', function() end)
TriggerServerEvent('admin:giveAll')

Malicious code:

-- DANGEROUS
load(base64decode(...))
loadstring(...)
os.execute(...)

Unauthorized external connections:

-- SUSPICIOUS
PerformHttpRequest('http://unknown-site.com/data', ...)

Clean code:

-- GOOD
ESX.ShowNotification('Message')
TriggerServerEvent('my_script:secureAction')

Scan with Antivirus

Scan the resource folder before upload:

  • VirusTotal
  • Windows Defender
  • Third-party antivirus

Test on Development Server

Recommended: Always test on a test server before production.

Resource Optimization

Disable Unused Resources

In server.cfg, comment or remove:

# ensure unused_resource

Limit Heavy Scripts

Avoid having too many scripts active simultaneously:

  • Maximum 50-70 active resources
  • Prefer optimized scripts
  • Merge small scripts

Use Optimized Alternatives

Replace old scripts with optimized versions:

  • mysql-asyncoxmysql (better performance)
  • esx_menu_defaultox_lib (lighter)

Advanced Configuration

Client-Only Resources

For resources without server:

-- fxmanifest.lua
client_only 'yes'

client_scripts {
    'client/*.lua'
}

Resources with Stream (Assets)

To add vehicles, weapons, clothing:

files {
    'stream/**/*.yft',
    'stream/**/*.ytd'
}

data_file 'HANDLING_FILE' 'stream/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'stream/vehicles.meta'

Resources with UI (NUI)

For HTML interfaces:

ui_page 'html/index.html'

files {
    'html/index.html',
    'html/style.css',
    'html/script.js'
}

Updating Resources

Update Process

  1. Backup the old version
  2. Read the changelog for changes
  3. Download the new version
  4. Replace files (except config.lua)
  5. Import new SQL files if necessary
  6. Test on development server
  7. Deploy to production

Preserve Configurations

# Backup your config before update
cp my_script/config.lua my_script_config_backup.lua

After update, compare and merge configurations.

Management via txAdmin

Install via txAdmin

  1. Access txAdmin
  2. Go to Resources
  3. Click Install Resource
  4. Enter GitHub URL or upload ZIP
  5. txAdmin installs and configures automatically

Manage Resources

In txAdmin:

  • Start/Stop/Restart: Control resources
  • View Logs: See errors
  • Edit Config: Modify configurations

Complete Installation Examples

Example 1: Simple Standalone Script

# 1. Download progressBars
# 2. Extract to resources/[standalone]/progressBars/
# 3. Add to server.cfg
ensure progressBars

# 4. Restart server

Example 2: ESX Script with Database

# 1. Download esx_garage
# 2. Extract to resources/[esx]/esx_garage/
# 3. Import esx_garage.sql in phpMyAdmin
# 4. Modify config.lua as needed
# 5. Add to server.cfg (after es_extended)
ensure es_extended
ensure esx_garage

# 6. Restart server

Example 3: Script with Multiple Dependencies

# 1. Install dependencies in order
ensure oxmysql
ensure PolyZone
ensure progressBars

# 2. Install main script
ensure my_custom_script

# 3. Check logs

Essential

oxmysql: Optimized database pma-voice: Voice system ox_lib: Modern interface library PolyZone: Zone management

Utilities

progressBars: Progress bars screenshot-basic: Screenshots bob74_ipl: Game interiors NativeUI: Native menus

Administration

txAdmin: Complete administration panel EasyAdmin: Player management vMenu: Administrator menu

Conclusion

Installing resources on FiveM is simple if you follow best practices:

  1. Download only from reliable sources
  2. Verify compatibility and dependencies
  3. Organize your resources in categorized folders
  4. Test on development server first
  5. Monitor logs to detect errors
  6. Backup configurations regularly

By following these steps, your server will be stable, secure, and performant.

Join our Discord community server

For any questions, suggestions, or just to chat with the community, join us on Discord!

900+Members