Tutorial 2026-01-28

The Complete fxmanifest.lua Guide for FiveM

TDYSKY

TDYSKY

Founder & Lead Developer at Agency Scripts

What is fxmanifest.lua?

Every FiveM resource requires a manifest file that tells the server what the resource contains and how to load it. The fxmanifest.lua file replaces the older __resource.lua format and provides a clean, declarative way to define your resource metadata. This file specifies which scripts run on the client, which run on the server, what NUI files to include, resource dependencies, and additional metadata. Getting your manifest right is essential because errors here can prevent your entire resource from loading.

Required Fields

Every manifest must start with two required fields: fx_version and games. The fx_version specifies the manifest format version, with 'cerulean' being the current standard that supports all modern features. The games field defines which game the resource supports, typically {'gta5'} for FiveM. Omitting either of these fields will cause the resource to fail loading entirely, so always include them as the first two lines of your manifest.

Script Declarations

Use client_scripts, server_scripts, and shared_scripts to declare your Lua files. Client scripts run on the player game client and handle rendering, input, and local game interaction. Server scripts run on the server and handle authoritative logic, database operations, and player management. Shared scripts run on both sides and are useful for configuration files, utility functions, and shared constants. You can use glob patterns like 'client/*.lua' to include all files in a directory, but explicit file lists give you control over load order.

NUI and File Declarations

If your resource includes a user interface, declare the entry HTML file with ui_page 'html/index.html'. Then list all web assets your UI needs in the files table, including HTML, CSS, JavaScript, images, and fonts. Only files listed here will be accessible to the NUI browser. Use glob patterns like 'html/**/*' to include entire directories. Remember that NUI files are sent to the client during resource loading, so keep your web assets optimized to reduce download times and bandwidth usage.

Dependencies and Load Order

Declare resource dependencies with the dependencies field to ensure required resources start before yours. Common dependencies include framework resources like qb-core or es_extended, database resources like oxmysql, and shared libraries. If a dependency is not started, your resource will fail to load and log a warning. Use provide to indicate that your resource serves as a replacement for another, which is useful when creating framework bridges or alternative implementations of common scripts.

Advanced Manifest Features

The manifest supports several additional directives for specialized use cases. Use data_file to load GTA data files like weapon metas, handling files, or vehicle model data. The export and server_export fields declare functions that other resources can call. Add metadata with description, author, and version fields for documentation purposes. The lua54 directive enables Lua 5.4 features when set to 'yes', giving you access to integer division, bitwise operators, and other language improvements that can simplify complex scripts.

Share this article

Ready to upgrade your server?

Check out our premium FiveM scripts in the Agency Scripts store or join our Discord community for support and updates.