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
- Connect to your FTP server
- Go to the
resources/folder - Create a folder for the resource (e.g.,
[custom]/) - Upload the complete resource folder
- Verify the structure is intact
Method 2: Via File Manager
- Log in to your game panel
- Go to Files or File Manager
- Navigate to
resources/ - Upload the ZIP file
- Extract it directly on the server
Recommended Organization
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:
.sqlfile in the foldersql/folder with SQL files- Mention in the README
Import the SQL File
- Open phpMyAdmin or your MySQL manager
- Select your database
- Click Import
- Select the
.sqlfile - 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):
- https://github.com/overextended/oxmysql
- Install before any resource using MySQL
PolyZone (zones):
- https://github.com/mkafrin/PolyZone
- To create interaction zones
progressBars (progress bars):
- https://github.com/EthanPeacock/progressBars
- To display loading animations
pma-voice (voice):
- https://github.com/AvarianKnight/pma-voice
- Optimized voice system
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
- Save all modified files
- Restart the server completely
- 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:
- Check logs for exact error
- Install all dependencies
- Verify fxmanifest.lua
- 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:
- Check oxmysql in server.cfg
- Import SQL file
- Verify MySQL connection in server.cfg
Conflict Between Resources
Symptoms:
- Commands no longer work
- Menus won't open
- Errors in console
Solutions:
- Disable resources one by one
- Identify problematic resource
- Check key/command conflicts
- 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-async → oxmysql (better performance)
- esx_menu_default → ox_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
- Backup the old version
- Read the changelog for changes
- Download the new version
- Replace files (except config.lua)
- Import new SQL files if necessary
- Test on development server
- 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
- Access txAdmin
- Go to Resources
- Click Install Resource
- Enter GitHub URL or upload ZIP
- 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
Recommended Resources
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:
- Download only from reliable sources
- Verify compatibility and dependencies
- Organize your resources in categorized folders
- Test on development server first
- Monitor logs to detect errors
- Backup configurations regularly
By following these steps, your server will be stable, secure, and performant.


















