{"id":162266,"date":"2024-10-11T19:42:29","date_gmt":"2024-10-11T17:42:29","guid":{"rendered":"https:\/\/hifivem.com\/?p=162266"},"modified":"2026-06-25T18:08:25","modified_gmt":"2026-06-25T16:08:25","slug":"setting-up-fxmanifest-lua-fivem","status":"publish","type":"post","link":"https:\/\/fivemx.com\/nl\/setting-up-fxmanifest-lua-fivem\/","title":{"rendered":"Setting Up fxmanifest.lua for FiveM"},"content":{"rendered":"<p><strong>Snel antwoord:<\/strong> every modern FiveM resource should include an <code>fxmanifest.lua<\/code> 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.<\/p>\n<p><em>Laatst bijgewerkt: 25 juni 2026<\/em><\/p>\n<h2>Minimal fxmanifest.lua<\/h2>\n<pre><code>fx_version 'cerulean'\ngame 'gta5'\n\nclient_script 'client.lua'\nserver_script 'server.lua'<\/code><\/pre>\n<p>Cfx.re&#8217;s official resource manifest documentation identifies <code>fxmanifest.lua<\/code> as the current manifest file and notes that old <code>__resource.lua<\/code> manifests are deprecated. Use <code>fx_version 'cerulean'<\/code> for modern FiveM resources unless a resource author documents a different requirement.<\/p>\n<h2>Client, server, and shared scripts<\/h2>\n<pre><code>fx_version 'cerulean'\ngame 'gta5'\n\nshared_scripts {\n    'config.lua',\n    '@ox_lib\/init.lua'\n}\n\nclient_scripts {\n    'client\/*.lua'\n}\n\nserver_scripts {\n    '@oxmysql\/lib\/MySQL.lua',\n    'server\/*.lua'\n}<\/code><\/pre>\n<p>Gebruik <code>shared_scripts<\/code> only for files that are safe on both sides. Do not put server secrets, license keys, database passwords, or webhook URLs into shared files.<\/p>\n<h2>NUI resource example<\/h2>\n<pre><code>fx_version 'cerulean'\ngame 'gta5'\n\nui_page 'web\/index.html'\n\nfiles {\n    'web\/index.html',\n    'web\/style.css',\n    'web\/app.js'\n}\n\nclient_script 'client.lua'<\/code><\/pre>\n<p>If a UI is blank in game, check that every HTML, CSS, JavaScript, font, and image file is listed under <code>files<\/code>. Missing files are a common cause of broken NUI screens.<\/p>\n<h2>Map or MLO resource example<\/h2>\n<pre><code>fx_version 'cerulean'\ngame 'gta5'\n\nthis_is_a_map 'yes'\n\nfiles {\n    'stream\/*.ymap',\n    'stream\/*.ytyp'\n}<\/code><\/pre>\n<p>For maps and interiors, keep streamed files in a <code>stream<\/code> 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.<\/p>\n<h2>Common mistakes<\/h2>\n<ul>\n<li>Gebruik van <code>__resource.lua<\/code> in a new resource.<\/li>\n<li>Putting <code>server.lua<\/code> under <code>client_scripts<\/code>.<\/li>\n<li>Forgetting NUI files under <code>files<\/code>.<\/li>\n<li>Putting secrets inside <code>shared_scripts<\/code>.<\/li>\n<li>Misspelling folders, especially <code>client<\/code>, <code>server<\/code>, en <code>stream<\/code>.<\/li>\n<\/ul>\n<h2>Validation checklist<\/h2>\n<ol>\n<li>Resource folder has <code>fxmanifest.lua<\/code> at the top level.<\/li>\n<li><code>game 'gta5'<\/code> is present for FiveM.<\/li>\n<li>Client files load on the client, server files load on the server.<\/li>\n<li>Every NUI\/static file is listed under <code>files<\/code>.<\/li>\n<li><code>server.cfg<\/code> includes <code>ensure resource-name<\/code>.<\/li>\n<\/ol>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"https:\/\/fivemx.com\/nl\/introduction-lua-scripting\/\">Introduction to Lua scripting for FiveM<\/a><\/li>\n<li><a href=\"https:\/\/fivemx.com\/nl\/write-fivem-scripts-using-ai\/\">How to write FiveM scripts using AI<\/a><\/li>\n<li><a href=\"https:\/\/fivemx.com\/nl\/how-to-check-txadmin-logs-for-errors\/\">How to check txAdmin logs<\/a><\/li>\n<\/ul>\n<section data-fivemx-rework-extra=\"2026-06-25\">\n<h2>Dependency order in server.cfg<\/h2>\n<p>The manifest tells FiveM which files belong to a resource, but <code>server.cfg<\/code> still controls start order. Start shared libraries and framework dependencies before resources that use them.<\/p>\n<pre><code>ensure oxmysql\nensure ox_lib\nensure qb-core\nensure my-script<\/code><\/pre>\n<p>If a resource throws export errors on startup, check whether the dependency is installed, named correctly, and ensured before the script that calls it.<\/p>\n<h2>Framework-specific notes<\/h2>\n<p>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.<\/p>\n<h2>Review checklist before publishing a script<\/h2>\n<ul>\n<li>No secrets in shared or client files.<\/li>\n<li>No unused test files listed in the manifest.<\/li>\n<li>All NUI assets listed under <code>files<\/code>.<\/li>\n<li>Dependencies documented in the README or product description.<\/li>\n<li>Resource starts cleanly after a full server restart.<\/li>\n<\/ul>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>Fast answer: 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. Last updated: June 25, 2026 Minimal fxmanifest.lua fx_version &#8216;cerulean&#8217; game &#8216;gta5&#8217; client_script &#8216;client.lua&#8217; server_script &#8216;server.lua&#8217; Cfx.re&#8217;s official resource manifest documentation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":162267,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2340,1899],"tags":[3001],"class_list":["post-162266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lua-scripting","category-tutorials","tag-fivem-script"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts\/162266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/comments?post=162266"}],"version-history":[{"count":3,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts\/162266\/revisions"}],"predecessor-version":[{"id":208864,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/posts\/162266\/revisions\/208864"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media\/162267"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/media?parent=162266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/categories?post=162266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/nl\/wp-json\/wp\/v2\/tags?post=162266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}