{"id":158077,"date":"2024-09-23T14:44:59","date_gmt":"2024-09-23T12:44:59","guid":{"rendered":"https:\/\/hifivem.com\/?p=158077"},"modified":"2026-08-16T15:16:27","modified_gmt":"2026-08-16T13:16:27","slug":"disattivare-aerei-ed-elicotteri","status":"publish","type":"post","link":"https:\/\/fivemx.com\/it\/disattivare-aerei-ed-elicotteri\/","title":{"rendered":"How to Disable Ambient Planes and Helicopters in FiveM"},"content":{"rendered":"<p><!-- fivemx-editorial-reindex:2026-08-16:158077 --><\/p>\n<p><strong>To reduce selected ambient aircraft in FiveM, create a client resource that calls <code data-no-translation=\"\">SetVehicleModelIsSuppressed<\/code> for an explicit list of model hashes.<\/strong> This targets natural spawning of those models; it is not a permission system and does not guarantee that another resource cannot create the same aircraft.<\/p>\n<div class=\"fivemx-guide-box fivemx-guide-warning\">\n<p>Test every model on the current FiveM client and game build. Native behaviour and ambient population can differ by location and build. Keep the model list small and preserve a rollback.<\/p>\n<\/div>\n<h2>Create the resource<\/h2>\n<p>Create <code data-no-translation=\"\">resources\/[local]\/ambient_aircraft_control<\/code> with these two files.<\/p>\n<p><code data-no-translation=\"\">fxmanifest.lua<\/code>:<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\" class=\"language-lua\">fx_version 'cerulean'\ngame 'gta5'\n\nauthor 'Your name'\ndescription 'Suppress selected ambient aircraft models'\nversion '1.0.0'\n\nclient_script 'client.lua'\n<\/code><\/pre>\n<p><code data-no-translation=\"\">client.lua<\/code>:<\/p>\n<pre data-no-translation=\"\"><code data-no-translation=\"\" class=\"language-lua\">local suppressedModels = {\n    `luxor`,\n    `shamal`,\n    `maverick`,\n    `frogger`,\n}\n\nCreateThread(function()\n    for i = 1, #suppressedModels do\n        SetVehicleModelIsSuppressed(suppressedModels[i], true)\n    end\nend)\n\nAddEventHandler('onResourceStop', function(resourceName)\n    if resourceName ~= GetCurrentResourceName() then\n        return\n    end\n\n    for i = 1, #suppressedModels do\n        SetVehicleModelIsSuppressed(suppressedModels[i], false)\n    end\nend)\n<\/code><\/pre>\n<p>The backtick values are CfxLua compile-time hashes. The current runtime and manifest forms are documented by Cfx.re in the <a href=\"https:\/\/docs.fivem.net\/docs\/scripting-manual\/runtimes\/lua\/\" rel=\"nofollow noopener\" target=\"_blank\">CfxLua guide<\/a> and <a href=\"https:\/\/docs.fivem.net\/docs\/scripting-reference\/resource-manifest\/\" rel=\"nofollow noopener\" target=\"_blank\">resource manifest reference<\/a>.<\/p>\n<h2>Choose the scope deliberately<\/h2>\n<p>Only include models you have observed spawning ambiently and actually want to suppress. The example names are illustrative GTA V aircraft models, not a recommended universal list. A scripted mission, admin command or vehicle shop may still create a suppressed model. If the goal is to control player access, enforce that in the authoritative server-side resource that grants or spawns vehicles.<\/p>\n<h2>Do not run the native every frame<\/h2>\n<p>The suppression state does not require a zero-delay loop in this resource. Apply it when the resource starts and reverse it when the resource stops. A permanent <code data-no-translation=\"\">Wait(0)<\/code> loop adds work without proving better behaviour.<\/p>\n<h2>Test before production<\/h2>\n<ol>\n<li>Back up the existing traffic or population resource.<\/li>\n<li>Add <code data-no-translation=\"\">ensure ambient_aircraft_control<\/code> on a development server.<\/li>\n<li>Run <code data-no-translation=\"\">refresh<\/code> and <code data-no-translation=\"\">ensure ambient_aircraft_control<\/code>.<\/li>\n<li>Observe known ambient-aircraft locations long enough to compare the same conditions before and after.<\/li>\n<li>Spawn an aircraft through any approved scripted workflow to confirm whether that separate use should remain available.<\/li>\n<li>Stop the resource and verify that its suppression state is reversed.<\/li>\n<\/ol>\n<h2>When suppression is not enough<\/h2>\n<p>If another resource repeatedly creates aircraft, change that resource&#8217;s configuration or server-authorized spawn path. If you need broader density changes, treat them as a separate population-management task and measure side effects on traffic, missions and other resources. Do not combine unrelated density natives into this small fix without a specific test.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a small client resource that suppresses selected ambient aircraft models, understand its limits and verify the result without blocking scripted vehicles.<\/p>","protected":false},"author":1,"featured_media":158078,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1899,2340],"tags":[3001],"class_list":["post-158077","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-lua-scripting","tag-fivem-script"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/posts\/158077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/comments?post=158077"}],"version-history":[{"count":5,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/posts\/158077\/revisions"}],"predecessor-version":[{"id":217362,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/posts\/158077\/revisions\/217362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/media\/158078"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/media?parent=158077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/categories?post=158077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/it\/wp-json\/wp\/v2\/tags?post=158077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}