{"id":162266,"date":"2024-10-11T19:42:29","date_gmt":"2024-10-11T17:42:29","guid":{"rendered":"https:\/\/hifivem.com\/?p=162266"},"modified":"2026-08-16T13:43:33","modified_gmt":"2026-08-16T11:43:33","slug":"setting-up-fxmanifest-lua-fivem","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pl\/setting-up-fxmanifest-lua-fivem\/","title":{"rendered":"Setting Up fxmanifest.lua for FiveM (Copy-Paste Examples)"},"content":{"rendered":"<p><strong>Szybka odpowied\u017a:<\/strong> every FiveM resource needs an <code data-no-translation=\"\">fxmanifest.lua<\/code> file in the resource folder. It tells FXServer which game the resource supports, which scripts to load, and which files go to clients. Below are copy-paste examples for a standard script resource, shared\/client\/server scripts, NUI resources (<code data-no-translation=\"\">ui_page<\/code> + <code data-no-translation=\"\">files<\/code>), and maps (<code data-no-translation=\"\">this_is_a_map 'yes'<\/code> with ymap streams), plus fixes for common manifest errors.<\/p>\n<p><em>Ostatnia aktualizacja: 25 czerwca 2026<\/em><\/p>\n<h2>Minimalny fxmanifest.lua<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">fx_version 'cerulean'\ngame 'gta5'\n\nclient_script 'client.lua'\nserver_script 'server.lua'<\/code><\/pre>\n<p>Oficjalna dokumentacja manifestu zasob\u00f3w Cfx.re identyfikuje <code data-no-translation=\"\">fxmanifest.lua<\/code> jako aktualny plik manifestu i zauwa\u017ca, \u017ce stare <code data-no-translation=\"\">__resource.lua<\/code> manifesty s\u0105 przestarza\u0142e. U\u017cyj <code data-no-translation=\"\">fx_version 'cerulean'<\/code> dla nowoczesnych zasob\u00f3w FiveM, chyba \u017ce autor zasobu udokumentuje inne wymagania.<\/p>\n<h2>Complete example with metadata<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">fx_version 'cerulean'\ngame 'gta5'\n\nauthor 'Your Name'\ndescription 'Example FiveM resource'\nversion '1.0.0'\n\nlua54 'yes'\n\nshared_script 'config.lua'\nclient_script 'client.lua'\nserver_script 'server.lua'<\/code><\/pre>\n<p>The <code data-no-translation=\"\">author<\/code>, <code data-no-translation=\"\">description<\/code>, oraz <code data-no-translation=\"\">version<\/code> fields are metadata: they do not change how scripts run, but FXServer prints a console warning such as &#8220;version is required. please specify a version in your fxmanifest.lua.&#8221; when <code data-no-translation=\"\">version<\/code> is missing. Add a <code data-no-translation=\"\">version '1.0.0'<\/code> line to clear it. The optional <code data-no-translation=\"\">lua54 'yes'<\/code> line enables Lua 5.4 for the resource and is required by many current frameworks and libraries.<\/p>\n<h2>Skrypty klienckie, serwerowe i wsp\u00f3\u0142dzielone<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">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>U\u017cywa\u0107 <code data-no-translation=\"\">shared_scripts<\/code> tylko dla plik\u00f3w, kt\u00f3re s\u0105 bezpieczne po obu stronach. Nie umieszczaj tajemnic serwera, kluczy licencyjnych, hase\u0142 do baz danych ani adres\u00f3w URL webhook w plikach wsp\u00f3\u0142dzielonych.<\/p>\n<h2>Przyk\u0142ad zasobu NUI<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">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>Je\u015bli UI jest puste w grze, sprawd\u017a, czy ka\u017cdy plik HTML, CSS, JavaScript, czcionka i obrazek jest wymieniony w <code data-no-translation=\"\">files<\/code>. Brakuj\u0105ce pliki s\u0105 cz\u0119st\u0105 przyczyn\u0105 zepsutych ekran\u00f3w NUI.<\/p>\n<h2>Przyk\u0142ad zasobu mapy lub MLO<\/h2>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">fx_version 'cerulean'\ngame 'gta5'\n\nthis_is_a_map 'yes'\n\nfiles {\n 'stream\/*.ymap',\n 'stream\/*.ytyp'\n}<\/code><\/pre>\n<p>Dla map i wn\u0119trz przechowuj pliki przesy\u0142ane strumieniowo w folderze <code data-no-translation=\"\">stream<\/code> i zweryfikuj, czy zas\u00f3b uruchamia si\u0119 bez ostrze\u017ce\u0144 konsoli. Je\u015bli mapa nie \u0142aduje si\u0119, u\u017cyj konsoli FiveM i dziennik\u00f3w txAdmin przed edytowaniem niezwi\u0105zanych zasob\u00f3w.<\/p>\n<h2>Cz\u0119ste b\u0142\u0119dy<\/h2>\n<ul>\n<li>U\u017cywanie <code data-no-translation=\"\">__resource.lua<\/code> w nowym zasobie.<\/li>\n<li>Umieszczanie <code data-no-translation=\"\">server.lua<\/code> pod <code data-no-translation=\"\">client_scripts<\/code>.<\/li>\n<li>Zapominanie plik\u00f3w NUI w <code data-no-translation=\"\">files<\/code>.<\/li>\n<li>Umieszczanie tajemnic wewn\u0105trz <code data-no-translation=\"\">shared_scripts<\/code>.<\/li>\n<li>B\u0142\u0119dne pisownie folder\u00f3w, szczeg\u00f3lnie <code data-no-translation=\"\">client<\/code>, <code data-no-translation=\"\">server<\/code>, oraz <code data-no-translation=\"\">stream<\/code>.<\/li>\n<\/ul>\n<h2>Lista kontrolna walidacji<\/h2>\n<ol>\n<li>Folder zasobu ma <code data-no-translation=\"\">fxmanifest.lua<\/code> na najwy\u017cszym poziomie.<\/li>\n<li><code data-no-translation=\"\">game 'gta5'<\/code> jest obecny dla FiveM.<\/li>\n<li>Pliki klienckie \u0142aduj\u0105 si\u0119 na kliencie, pliki serwerowe \u0142aduj\u0105 si\u0119 na serwerze.<\/li>\n<li>Ka\u017cdy plik NUI\\\/static jest wymieniony w <code data-no-translation=\"\">files<\/code>.<\/li>\n<li><code data-no-translation=\"\">server.cfg<\/code> zawiera <code data-no-translation=\"\">ensure resource-name<\/code>.<\/li>\n<\/ol>\n<h2>Powi\u0105zane przewodniki<\/h2>\n<ul>\n<li><a href=\"https:\/\/fivemx.com\/pl\/introduction-lua-scripting\/\">Wprowadzenie do skryptowania w Lua dla FiveM<\/a><\/li>\n<li><a href=\"https:\/\/fivemx.com\/pl\/write-fivem-scripts-using-ai\/\">Jak pisa\u0107 skrypty FiveM za pomoc\u0105 AI<\/a><\/li>\n<li><a href=\"https:\/\/fivemx.com\/pl\/how-to-check-txadmin-logs-for-errors\/\">Jak sprawdzi\u0107 logi txAdmin<\/a><\/li>\n<\/ul>\n<section data-fivemx-rework-extra=\"2026-06-25\">\n<h2>Kolejno\u015b\u0107 zale\u017cno\u015bci w server.cfg<\/h2>\n<p>Manifest m\u00f3wi FiveM, kt\u00f3re pliki nale\u017c\u0105 do zasobu, ale <code data-no-translation=\"\">server.cfg<\/code> nadal kontroluje kolejno\u015b\u0107 uruchamiania. Uruchom biblioteki wsp\u00f3\u0142dzielone i zale\u017cno\u015bci frameworku przed zasobami, kt\u00f3re z nich korzystaj\u0105.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">ensure oxmysql\nensure ox_lib\nensure qb-core\nensure my-script<\/code><\/pre>\n<p>Je\u015bli zas\u00f3b zg\u0142asza b\u0142\u0119dy eksportu podczas uruchamiania, sprawd\u017a, czy zale\u017cno\u015b\u0107 jest zainstalowana, poprawnie nazwana i uruchomiona przed skryptem, kt\u00f3ry j\u0105 wywo\u0142uje.<\/p>\n<h2>Uwagi specyficzne dla frameworku<\/h2>\n<p>Zasoby ESX, QBCore i Qbox cz\u0119sto wymagaj\u0105 import\u00f3w frameworku, bibliotek baz danych i plik\u00f3w konfiguracyjnych. Zachowaj konfiguracj\u0119 frameworku w udokumentowanych plikach. Nie ukrywaj wa\u017cnych ustawie\u0144 w przypadkowych plikach klienckich. Czytelny manifest u\u0142atwia wsparcie, poniewa\u017c personel widzi ka\u017cdy \u0142adowany plik.<\/p>\n<h2>Przejrzyj list\u0119 kontroln\u0105 przed opublikowaniem skryptu<\/h2>\n<ul>\n<li>Brak tajemnic w plikach wsp\u00f3\u0142dzielonych lub klienckich.<\/li>\n<li>Brak nieu\u017cywanych plik\u00f3w testowych wymienionych w manife\u015bcie.<\/li>\n<li>Wszystkie zasoby NUI wymienione pod <code data-no-translation=\"\">files<\/code>.<\/li>\n<li>Zale\u017cno\u015bci udokumentowane w README lub opisie produktu.<\/li>\n<li>Zas\u00f3b uruchamia si\u0119 bezproblemowo po pe\u0142nym restarcie serwera.<\/li>\n<\/ul>\n<\/section>\n<section data-fivemx-quality-wave=\"2026-07-01:162266\">\n<h2>Kolejno\u015b\u0107 zale\u017cno\u015bci nadal ma znaczenie<\/h2>\n<p>Manifest informuje FXServer, kt\u00f3re pliki nale\u017c\u0105 do zasobu, ale <code data-no-translation=\"\">server.cfg<\/code> nadal kontroluje kolejno\u015b\u0107 uruchamiania. Uruchom wsp\u00f3\u0142dzielone biblioteki, frameworki i zale\u017cno\u015bci baz danych przed skryptami, kt\u00f3re je wywo\u0142uj\u0105. Je\u015bli zas\u00f3b zg\u0142asza b\u0142\u0119dy eksportu podczas uruchamiania, sprawd\u017a nazw\u0119 i kolejno\u015b\u0107 zale\u017cno\u015bci przed edycj\u0105 samego skryptu.<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\">ensure oxmysql\nensure ox_lib\nensure qb-core\nensure my-script<\/code><\/pre>\n<h2>Przegl\u0105d przed wys\u0142aniem zasobu<\/h2>\n<p>Sprawd\u017a, czy pliki klienta nie zawieraj\u0105 poufnych informacji, pliki serwera nie s\u0105 wysy\u0142ane do klienta, zasoby NUI s\u0105 wymienione w sekcji <code data-no-translation=\"\">files<\/code>, a zale\u017cno\u015bci s\u0105 nazwane dok\u0142adnie tak, jak s\u0105 zainstalowane. Dzia\u0142aj\u0105cy manifest powinien sprawi\u0107, \u017ce zas\u00f3b b\u0119dzie zrozumia\u0142y dla innego dewelopera bez otwierania ka\u017cdego pliku Lua.<\/p>\n<p>Je\u015bli skrypt u\u017cywa eksport\u00f3w frameworka, bibliotek baz danych lub wsp\u00f3lnej konfiguracji, udokumentuj to w pliku README lub notatkach o produkcie. Wi\u0119kszo\u015b\u0107 problem\u00f3w z instalacj\u0105 wynika z brakuj\u0105cych zale\u017cno\u015bci lub nieprawid\u0142owej kolejno\u015bci uruchamiania, a nie z samej sk\u0142adni manifestu.<\/p>\n<p>Po edycji manifestu, uruchom ponownie ca\u0142y serwer. Hot reloads mog\u0105 ukry\u0107 brakuj\u0105ce pliki lub problemy z kolejno\u015bci\u0105, kt\u00f3re pojawiaj\u0105 si\u0119 dopiero po czystym uruchomieniu.<\/p>\n<p>Je\u015bli czysty rozruch si\u0119 nie powiedzie, przeczytaj pierwszy b\u0142\u0105d, a nie ostatni\u0105 kaskad\u0119 b\u0142\u0119d\u00f3w po tym, jak zale\u017cno\u015bci zosta\u0142y ju\u017c zerwane.<\/p>\n<\/section>\n<section data-fivemx-layout-content-perfection=\"2026-07-11\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.fivemx.com\/wp-content\/uploads\/2026\/07\/162266-fxmanifest-anatomy.webp\" alt=\"fxmanifest.lua layers for metadata, scripts, dependencies and files\" width=\"1600\" height=\"900\" title=\"\"><figcaption>A resource manifest declares metadata, executable scripts, dependencies and packaged files.<\/figcaption><\/figure>\n<h2>Read an fxmanifest in four layers<\/h2>\n<ul>\n<li><strong>Metadata:<\/strong> declare the FX version, supported game and useful author, description and version details.<\/li>\n<li><strong>Skrypty:<\/strong> separate client, server and shared execution deliberately; do not expose server-only logic to clients.<\/li>\n<li><strong>Zale\u017cno\u015bci:<\/strong> state resources or runtime constraints that must exist before this resource can run.<\/li>\n<li><strong>Pliki:<\/strong> include NUI and data assets that clients need. Cfx.re notes that a local <code data-no-translation=\"\">ui_page<\/code> and its dependencies must be referenced in <code data-no-translation=\"\">files<\/code>.<\/li>\n<\/ul>\n<p>The manifest is semi-declarative Lua executed separately from the resource scripts. Keep it explicit, remove obsolete entries, and verify every referenced path on a case-sensitive production filesystem.<\/p>\n<p><a href=\"https:\/\/docs.fivem.net\/docs\/scripting-reference\/resource-manifest\/\" rel=\"nofollow noopener\" target=\"_blank\">Cfx.re resource-manifest reference<\/a><\/p>\n<\/section>\n<p><!-- fivemx-blog-portfolio-wave2:2026-08-09:setting-up-fxmanifest-lua-fivem --><\/p>\n<h2>Editorial review and source policy<\/h2>\n<p>The manifest examples were retained because they match the current Cfx.re resource-manifest model. The official manifest reference is the authority for directives, and deprecated <code data-no-translation=\"\">__resource.lua<\/code> examples must not be introduced.<\/p>","protected":false},"excerpt":{"rendered":"<p>Fast answer: every FiveM resource needs an fxmanifest.lua file in the resource folder. It tells FXServer which game the resource supports, which scripts to load, and which files go to clients. Below are copy-paste examples for a standard script resource, shared\/client\/server scripts, NUI resources (ui_page + files), and maps (this_is_a_map &#8216;yes&#8217; with ymap streams), plus [&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"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/162266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/comments?post=162266"}],"version-history":[{"count":7,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/162266\/revisions"}],"predecessor-version":[{"id":217315,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/162266\/revisions\/217315"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media\/162267"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media?parent=162266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/categories?post=162266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/tags?post=162266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}