01
What the fxmanifest.lua is for
A FiveM resource is a folder in resources: a script, a map, a vehicle, an interface. The server only recognises it if that folder contains, directly at its root, an fxmanifest.lua file. This manifest is written in Lua and lists what the resource contains. The smallest useful manifest:
fx_version 'cerulean'
game 'gta5'
author 'Votre nom'
description 'Ma première ressource'
version '1.0.0'
client_script 'client.lua'
server_script 'server.lua'
The resource takes the name of its folder. You start it with ensure followed by that name in the server.cfg (see FiveM's server.cfg). After changing the manifest on a running server, type in the console:
refresh
ensure nom_de_la_ressource
refresh rereads the manifests; without it, the server keeps the old version of the file. Installing ready-made resources is covered in installing a FiveM script.
02
fx_version, game and resource information
fx_version 'cerulean': the manifest format version. cerulean is the current value; old resources still carry adamant or bodacious. Use cerulean in everything you write.
game 'gta5': the resource is made for FiveM. For a resource that works on both games, write games { 'gta5', 'rdr3' }.
author, description, version: information to help you keep track, with no effect on loading. Keep version up to date; it helps when comparing two copies of the same resource.
lua54 'yes': runs the resource's Lua scripts with Lua 5.4. Many recent resources need it: without this line, a script that uses Lua 5.4 syntax (such as <const>) produces an error on load.
For RedM, the manifest states game 'rdr3' and must contain a warning line, copied word for word; without it, the resource refuses to start:
fx_version 'cerulean'
game 'rdr3'
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
To host a RedM server, see our RedM plan.
03
Scripts: client, server and shared
Three directives say where each script runs. Each exists in the singular (one file) and the plural (a list in braces):
client_script / client_scripts: run in each player's game. They are sent to the player, so the player can read them: put no passwords or logic to protect in them;
server_script / server_scripts: run on the server only, never sent to players. This is where database access and checks go;
shared_script / shared_scripts: loaded on both sides, before the other scripts on each side. They usually hold the configuration (config.lua) and translations.
shared_scripts {
'@ox_lib/init.lua',
'config.lua'
}
client_scripts {
'client/*.lua'
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/*.lua'
}
- Order matters: files load in the order of the list.
- Wildcards:
client/*.lua takes all .lua files in the folder, **/*.lua those in all subfolders.
- The
@: '@oxmysql/lib/MySQL.lua' loads a file from another resource, here the database access library of oxmysql. That resource must be present and started first.
Framework resources (ESX, QBCore, Qbox) often add their own files this way: follow your framework's documentation (see ESX, QBCore or Qbox).
04
Files, NUI interface and game data
files lists the files, other than scripts, to send to players: HTML pages, styles, images, sounds, .meta files. ui_page sets the interface page (NUI) shown in the game:
ui_page 'html/index.html'
files {
'html/index.html',
'html/style.css',
'html/script.js',
'html/img/*.png'
}
The ui_page page and everything it loads must be listed in files: a forgotten file gives an empty or incomplete interface, with no error on the server side. A loading screen is declared the same way with loadscreen.
Game data. A vehicle's or weapon's .meta files are listed in files and declared with data_file, which states their type (for example data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'). Models and textures placed in a stream folder are sent without needing to be listed. A map or an interior adds this_is_a_map 'yes': see installing an MLO.
05
dependencies, escrow_ignore and the old __resource.lua
dependencies lists the resources without which yours cannot work. The server starts them before it if they are present, and refuses to start yours if one is missing. Two special forms let you require a minimum server version or OneSync:
dependencies {
'oxmysql',
'ox_lib',
'/server:NUMERO_DE_VERSION',
'/onesync'
}
escrow_ignore concerns escrow-protected resources sold on the Cfx.re store: their files are encrypted, except those listed here, which the buyer can read and edit (usually the configuration and translations). You can recognise a protected resource by its .fxap file.
escrow_ignore {
'config.lua',
'locales/*.lua'
}
Do not remove these lines and do not edit the encrypted files. An escrow resource only starts with a licence key from the Cfx.re account that bought it: see the FiveM licence key.
The old __resource.lua. Before fxmanifest.lua, the manifest was called __resource.lua and started with a resource_manifest_version line followed by an identifier. This format is obsolete. To convert an old resource: rename the file to fxmanifest.lua, replace the resource_manifest_version line with fx_version 'cerulean' and game 'gta5', keep the rest, then test. Do not leave both files in the same folder. The most common startup errors are gathered in FiveM server errors.
06
On CloudFive
On our FiveM hosting plans, from €2.50 per month, you stay in control of every resource:
- files:
fxmanifest.lua can be edited from the file manager of the customer area manager.cloudfive.fr or over SFTP;
- txAdmin included and the console, to type
refresh and ensure and read loading errors live;
- ESX, QBCore or Qbox in one click, with MariaDB databases for resources that use oxmysql;
- the artifacts version installed and the available versions are shown, with a button to go back to the previous one (a backup is made first), useful when a resource requires
/server:;
- the licence key: a shared Patreon key is provided at no extra cost, limited to 48 players. For an escrow resource, ask support before buying.
The server is ready in about 30 seconds, in France, on an AMD Ryzen 9 9950X with DDR5 memory and NVMe storage, on our own network, with Anti-DDoS Premium included and a profile specific to FiveM. Monthly, with no commitment, and French-speaking support 7 days a week.
07
Frequently asked questions
What goes at the top of an fxmanifest.lua?
The two lines fx_version 'cerulean' and game 'gta5' for FiveM. For RedM, game 'rdr3' and the rdr3_warning line with the exact warning text. Then add author, description and version, followed by the scripts and files.
What is the difference between client_scripts, server_scripts and shared_scripts?
client_scripts run in each player's game and are sent to them. server_scripts run only on the server and are never sent. shared_scripts are loaded on both sides, usually for configuration and translations.
What does lua54 'yes' do in an fxmanifest?
This line runs the resource's Lua scripts with Lua 5.4. Many recent resources need it: without it, a script that uses Lua 5.4 syntax causes an error on load.
How do I convert a __resource.lua into an fxmanifest.lua?
Rename the file to fxmanifest.lua, replace the resource_manifest_version line with fx_version 'cerulean' and game 'gta5', and keep the rest. Do not leave both files in the folder, then type refresh and ensure followed by the resource name in the console.
What does escrow_ignore mean in an fxmanifest?
In an escrow-protected resource sold on the Cfx.re store, escrow_ignore lists the files left readable and editable, often the configuration and translations. The other files are encrypted, and the resource only starts with a licence key from the account that bought it.