Use Coupon WELCOME to save 20%

$ USD
  • $ USD
  • € EUR
  • £ GBP
  • $ AUD
  • R$ BRL
  • CHF CHF
  • ¥ JPY
Setting Up fxmanifest.lua (FiveM)

How to Write and Check a FiveM fxmanifest.lua

Open the fxmanifest Generator & Validator

An fxmanifest.lua belongs at the root of a FiveM resource. It declares the supported game, scripts, dependencies and client-delivered files. Choose the example that matches your resource and replace every example filename with a file that actually exists.

The configuration and code examples here target FiveM for GTA V Legacy. Enhanced has different runtime and compatibility rules; check Cfx.re’s Legacy-to-Enhanced changes before applying them to an Enhanced server.

A minimal script resource

fx_version 'cerulean'
game 'gta5'

client_script 'client.lua'
server_script 'server.lua'

Use client_script for code running on each player’s client and server_script for FXServer code. Add author, description and version metadata when useful. A dependency may inspect your version, but version metadata does not itself change execution. Current CfxLua uses Lua 5.4; the lua54 switch is deprecated.

Shared files and dependencies

fx_version 'cerulean'
game 'gta5'

dependencies { 'ox_lib', 'oxmysql' }
shared_scripts { '@ox_lib/init.lua', 'config.lua' }
client_scripts { 'client/*.lua' }
server_scripts { '@oxmysql/lib/MySQL.lua', 'server/*.lua' }

This example requires the named libraries; omit them when your resource does not use them. Shared scripts are delivered to clients, so keep credentials, webhooks and server-only authority checks out of shared files. Declare the dependencies your code actually needs and follow their documented startup order.

A browser interface with NUI

fx_version 'cerulean'
game 'gta5'

ui_page 'web/index.html'
files { 'web/index.html', 'web/style.css', 'web/app.js' }
client_script 'client.lua'

List every required local UI asset, including fonts and images. A blank interface requires checking both its page path and missing assets. A loading screen uses loadscreen and its own lifecycle instead of this ui_page example.

Maps and additional archetypes

fx_version 'cerulean'
game 'gta5'

this_is_a_map 'yes'
files { 'stream/example.ytyp' }
data_file 'DLC_ITYP_REQUEST' 'stream/example.ytyp'

Put streamable assets in stream. The YTYP registration shown here is for a resource containing that file; a simple YMAP-only resource does not need a fictitious YTYP. Use the data-file declaration required by the actual asset type.

Start and verify

  1. Check that the folder contains fxmanifest.lua directly and that all paths match the actual filenames, including case.
  2. Install the declared dependencies. Add ensure followed by the resource-folder name to server.cfg after the documented dependencies.
  3. Run refresh and ensure resource-name in the development server console, substituting your folder name. Read the first startup error.
  4. Join, exercise the resource and inspect F8 as well as the server console. Test a full server restart to catch dependency and packaging errors hidden by hot reloads.

Common errors

Missing file: compare the exact manifest path and filename. Missing export: check dependency version and initialization order. Secrets visible to clients: move them out of shared/client files and rotate exposed values.

Do not shorten a vendor manifest by copying this tutorial over it. Use the official manifest reference and data-file reference to understand each declaration before changing it.

What should I check in a purchased resource manifest?

Compare the declared dependencies and build requirements with your server before starting the resource. Check that referenced scripts and interface files are present. A valid manifest describes what to load; it does not certify the resource’s gameplay, performance or framework integration.

Cfx.re manifest reference

View the package requirements for ESX Server Base (by RibSosay)

Leave a Reply