Dostępny kupon WELCOME Użyj kodu WELCOME przy kasie do 31 lipca 2026 r. WELCOME

Setting Up fxmanifest.lua for FiveM

Szybka odpowiedź: every modern FiveM resource should include an fxmanifest.lua file in the resource folder. It tells FXServer which game the resource supports, which scripts to load, and which files must be sent to clients.

Ostatnia aktualizacja: 25 czerwca 2026

Minimal fxmanifest.lua

fx_version 'cerulean'
game 'gta5'

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

Cfx.re’s official resource manifest documentation identifies fxmanifest.lua as the current manifest file and notes that old __resource.lua manifests are deprecated. Use fx_version 'cerulean' for modern FiveM resources unless a resource author documents a different requirement.

Client, server, and shared scripts

fx_version 'cerulean'
game 'gta5'

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

client_scripts {
    'client/*.lua'
}

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

Używać shared_scripts only for files that are safe on both sides. Do not put server secrets, license keys, database passwords, or webhook URLs into shared files.

NUI resource example

fx_version 'cerulean'
game 'gta5'

ui_page 'web/index.html'

files {
    'web/index.html',
    'web/style.css',
    'web/app.js'
}

client_script 'client.lua'

If a UI is blank in game, check that every HTML, CSS, JavaScript, font, and image file is listed under files. Missing files are a common cause of broken NUI screens.

Map or MLO resource example

fx_version 'cerulean'
game 'gta5'

this_is_a_map 'yes'

files {
    'stream/*.ymap',
    'stream/*.ytyp'
}

For maps and interiors, keep streamed files in a stream folder and verify the resource starts without console warnings. If a map does not load, use the FiveM console and txAdmin logs before editing unrelated resources.

Common mistakes

  • Używanie __resource.lua in a new resource.
  • Putting server.lua pod client_scripts.
  • Forgetting NUI files under files.
  • Putting secrets inside shared_scripts.
  • Misspelling folders, especially client, server, oraz stream.

Validation checklist

  1. Resource folder has fxmanifest.lua at the top level.
  2. game 'gta5' is present for FiveM.
  3. Client files load on the client, server files load on the server.
  4. Every NUI/static file is listed under files.
  5. server.cfg includes ensure resource-name.

Dependency order in server.cfg

The manifest tells FiveM which files belong to a resource, but server.cfg still controls start order. Start shared libraries and framework dependencies before resources that use them.

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my-script

If a resource throws export errors on startup, check whether the dependency is installed, named correctly, and ensured before the script that calls it.

Framework-specific notes

ESX, QBCore, and Qbox resources often need framework imports, database libraries, and config files. Keep framework setup in documented files. Do not hide important setup in random client files. A clean manifest makes support easier because staff can see every file that loads.

Review checklist before publishing a script

  • No secrets in shared or client files.
  • No unused test files listed in the manifest.
  • All NUI assets listed under files.
  • Dependencies documented in the README or product description.
  • Resource starts cleanly after a full server restart.
Łukasz
Łukasz

Nazywam się Luke, jestem graczem i uwielbiam pisać o FiveM, GTA i grach RPG. Prowadzę społeczność RPG i mam około 10 lat doświadczenia w administrowaniu serwerami.

Artykuły: 436

Dodaj komentarz