Aller au contenu

Générateur de fxmanifest.lua

Génère un fxmanifest.lua valide pour n'importe quelle resource FiveM ou RedM : scripts shared/client/server, page NUI, files, dépendances, exports et lua54.

Cet outil et ses notes sont en anglais pour l'instant.

Config & codeResource, TéléchargementLire la doc
Start from

Resource

Game

Scripts

shared_scripts
client_scripts
server_scripts

NUI & files

files
Files sent to clients. Globs like ** are supported.

data_file

Dependencies & exports

dependencies
Resources that must start first. /onesync, /server:<artifact> and /gameBuild:<build> set server requirements.
exports (client)
Only needed for old style exports. exports('name', fn) in Lua works without this.
server_exports
escrow_ignore
Files left readable when the resource is uploaded to the Cfx.re asset escrow.
fxmanifest.lua
fx_version 'cerulean'
game 'gta5'
lua54 'yes'

name 'my_script'
description 'Basic client/server script'
version '1.0.0'

shared_scripts {
    'config.lua',
}

client_scripts {
    'client/*.lua',
}

server_scripts {
    'server/*.lua',
}

How to use it

  1. Pick a starting point: Basic script, NUI resource or Vehicle pack.
  2. Add or remove scripts. The small + @ox_lib/init.lua style buttons add common framework imports.
  3. Download fxmanifest.lua into your resource folder and ensure the resource in server.cfg.

Your manifest is saved in this browser, so you can come back and tweak it.

Load order

Scripts load in the order they are listed, and shared_scripts load before client and server scripts on each side. That is why @ox_lib/init.lua or @qbx_core/modules/lib.lua go at the top of shared_scripts, and config.lua should come before any file that reads Config. Paths starting with @ point into another resource, which needs to be started first (list it in dependencies).

A typical Qbox / ox_lib manifest

fx_version 'cerulean'
game 'gta5'
lua54 'yes'

name 'my_job'
version '1.0.0'

shared_scripts {
    '@ox_lib/init.lua',
    '@qbx_core/modules/lib.lua',
    'config.lua',
}

client_scripts {
    '@qbx_core/modules/playerdata.lua',
    'client/*.lua',
}

server_scripts {
    '@oxmysql/lib/MySQL.lua',
    'server/*.lua',
}

dependencies {
    'ox_lib',
    'qbx_core',
    'oxmysql',
}

Vehicle packs

Put models (.yft, .ytd) in a stream folder, they are streamed automatically. Meta files need two things: a files entry so clients download them, and a data_file line so the game loads them. Globs such as data/**/vehicles.meta let you keep one folder per car.

Gotchas

  • ui_page must also be in files, or the NUI frame stays blank. The generator adds it for you.
  • fxmanifest.lua replaced the old __resource.lua. Do not ship both.
  • RedM resources need game 'rdr3' plus the exact rdr3_warning line, which is added automatically.
  • Changing the manifest requires refresh then ensure your_resource in the server console.