{"id":158077,"date":"2024-09-23T14:44:59","date_gmt":"2024-09-23T12:44:59","guid":{"rendered":"https:\/\/hifivem.com\/?p=158077"},"modified":"2026-06-24T17:40:39","modified_gmt":"2026-06-24T15:40:39","slug":"disable-airplanes-and-helicopters","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pl\/disable-airplanes-and-helicopters\/","title":{"rendered":"How to Disable AI Planes and Helicopters in FiveM"},"content":{"rendered":"<p><strong>How to Disable Airplanes and Helicopters in FiveM<\/strong><\/p>\n<p><em>FiveM servers can become bogged down by artificial intelligence (AI) aircraft that randomly spawn at airports and airfields. Whether you\u2019re running a realistic utopia or a post\u2011apocalyptic sandbox, those AI planes and helicopters can degrade performance, interfere with gameplay, and clash with your server\u2019s theme. This guide walks you through a quick, easy script you can add to your server that disables all unwanted AI airplanes and helicopters, giving your players a smoother experience.<\/em><\/p>\n<h2>Why Disabling AI Planes and Helicopters Matters<\/h2>\n<p>&#8211; <strong>Improved Server Performance<\/strong> \u2013 Fewer entities mean less CPU and memory usage, freeing resources for other scripts and assets.<br \/>\n&#8211; <strong>Cleaner Gameplay<\/strong> \u2013 Protect missions and role\u2011play scenarios from unplanned air traffic.<br \/>\n&#8211; <strong>Thematic Coherence<\/strong> \u2013 A sandbox set in a destroyed city can feel more authentic when no airplanes drift overhead.<br \/>\n&#8211; <strong>Reduced Lag<\/strong> \u2013 AI aircraft are resource-intensive. Knocking them out of the equation can lower ping and increase frame rates for your players.<\/p>\n<h2>Disabling AI Planes and Helicopters with the gd_airport_ai_begone Script<\/h2>\n<p>The <em>gd_airport_ai_begone<\/em> resource is a lightweight solution that removes a broad set of scenarios, models, and spawn points around all major San Andreas airports. Once injected into your server, the script automatically stops jets, turboprops, and various ground vehicles from appearing on the tarmacs. It also guards against remote spawn requests from distant sky locations.<\/p>\n<h3>Step\u2011by\u2011Step Implementation<\/h3>\n<p>1. <strong>Create a Resource Folder<\/strong><br \/>\n   <em>Navigate to your server\u2019s `resources` directory and create a new folder named `gd_airport_ai_begone`.<\/em><\/p>\n<p>2. <strong>Add a Manifest File<\/strong><br \/>\n   <em>Inside that directory, create either `__resource.lua` (for legacy servers) or, better yet, `fxmanifest.lua` if you use the latest server version:<\/em><br \/>\n   &#8220;`lua<br \/>\n   fx_version &#8216;cerulean&#8217;<br \/>\n   game &#8216;gta5&#8217;<br \/>\n   client_script &#8216;client.lua&#8217;<br \/>\n   &#8220;`<\/p>\n<p>3. <strong>Write the Client Side Script<\/strong><br \/>\n   <em>Create `client.lua` and paste the following:<\/em><br \/>\n   &#8220;`lua<br \/>\n   Citizen.CreateThread(function()<br \/>\n       local SCENARIO_TYPES = {<br \/>\n           WORLD_VEHICLE_MILITARY_PLANES_SMALL,<br \/>\n           WORLD_VEHICLE_MILITARY_PLANES_BIG<br \/>\n       }<br \/>\n       local SCENARIO_GROUPS = {<br \/>\n           2017590552,  &#8212; LSIA planes<br \/>\n           2141866469,  &#8212; Sandy Shores planes<br \/>\n           1409640232,  &#8212; Grapeseed planes<br \/>\n           ng_planes  &#8212; jets \u201chigh\u201d in the sky<br \/>\n       }<br \/>\n       local SUPPRESSED_MODELS = {<br \/>\n           SHAMAL, LUXOR, LUXOR2, JET,<br \/>\n           LAZER, TITAN, BARRACKS, BARRACKS2,<br \/>\n           CRUSADER, RHINO, AIRTUG, RIPLEY<br \/>\n       }<\/p>\n<p>       while true do<br \/>\n           for _, type in pairs(SCENARIO_TYPES) do<br \/>\n               SetScenarioTypeEnabled(type, false)<br \/>\n           ko\u0144cu<br \/>\n           for _, group in pairs(SCENARIO_GROUPS) do<br \/>\n               SetScenarioGroupEnabled(group, false)<br \/>\n           ko\u0144cu<br \/>\n           for _, model in pairs(SUPPRESSED_MODELS) do<br \/>\n               SetVehicleModelIsSuppressed(GetHashKey(model), true)<br \/>\n           ko\u0144cu<br \/>\n           Citizen.Wait(10000)  &#8212; Re\u2011evaluate every 10 seconds<br \/>\n       ko\u0144cu<br \/>\n   end)<br \/>\n   &#8220;`<br \/>\n   <em>The script revolves around three arrays: <\/em>SCENARIO_TYPES<em> (small and large military planes), <\/em>SCENARIO_GROUPS<em> (airport\u2011based spawn pools), and <\/em>SUPPRESSED_MODELS<em> (specific aircraft and support vehicles). Adjust these lists if you wish to re\u2011enable particular models.<\/em><\/p>\n<p>4. <strong>Load the Resource<\/strong><br \/>\n   <em>Open `server.cfg` and add:<\/em><br \/>\n   &#8220;`<br \/>\n   start gd_airport_ai_begone<br \/>\n   &#8220;`<br \/>\n   <em>Save and close.<\/em><\/p>\n<p>5. <strong>Zrestartuj<\/strong><br \/>\n   <em>Reboot the server or run the console command `restart gd_airport_ai_begone` to activate the new script.<\/em><\/p>\n<h2>Customizing the Script<\/h2>\n<p>If you\u2019re on a mixed\u2011traffic server and want a few aircraft left in the sky, edit the `SUPPRESSED_MODELS` array. Comment out or remove any model you wish to return. For example, to keep jets alive, delete the `JET` line. After adjusting, restart the resource to see the changes take effect.<\/p>\n<h2>Best Practices<\/h2>\n<p>&#8211; <strong>Back Up<\/strong> \u2013 Before touching any server files, make a copy of your current configuration and scripts.<br \/>\n&#8211; <strong>Test Thoroughly<\/strong> \u2013 Once the server is running, hop into each airport area to confirm no unwanted aircraft appear.<br \/>\n&#8211; <strong>Monitor Resource Usage<\/strong> \u2013 Use tools like the FiveM console\u2019s `stats` command or external monitoring software to verify that CPU usage has decreased after disabling AI planes.<br \/>\n&#8211; <strong>Keep Scripts Updated<\/strong> \u2013 If FiveM changes the underlying spawning mechanics, you may need to tweak scenario names or model hashes.<\/p>\n<h2>Podsumowanie<\/h2>\n<p>By adding the <em>gd_airport_ai_begone<\/em> script to your FiveM server, you effortlessly disable AI airplanes and helicopters that can otherwise clutter the sky, drain performance, and disrupt your desired gameplay atmosphere. This small change frees up computing power, delivers a cleaner experience, and keeps your server\u2019s world cohesive. If you run into any hiccups or want to share additional tweaks, drop a comment below or participate in the FiveM community forums for support.<\/p>\n<p><!-- fivemx-quality-enrichment-v2 --><\/p>\n<h2>Practical checklist<\/h2>\n<p>Use this guide as a staging checklist before changing a live FiveM server. Confirm the current server artifact version, framework version, resource dependencies, database changes, and any client-side files before you apply the change.<\/p>\n<ul>\n<li>Back up the affected configuration files and database tables.<\/li>\n<li>Apply the change on a test server first.<\/li>\n<li>Watch the server console and client F8 console for errors.<\/li>\n<li>Check whether the change affects jobs, inventory, vehicles, maps, voice, permissions, or player data.<\/li>\n<li>Document the exact file, command, or setting you changed so it can be reverted quickly.<\/li>\n<\/ul>\n<h2>Testing before production<\/h2>\n<p>After the first test, join with a normal player account and repeat the flow from the player perspective. If the topic involves performance, measure before and after with the same player count, route, and resource set. If it involves admin tools or permissions, verify both allowed and denied users.<\/p>\n<h2>Common mistakes<\/h2>\n<p>Most FiveM issues come from missing dependencies, stale cache, wrong folder names, framework mismatch, or configuration copied from another server. Avoid changing multiple systems at once; make one change, test it, and then continue.<\/p>\n<h2>Related resources<\/h2>\n<p>For production-ready assets, compare paid resources in the <a href=\"https:\/\/fivemx.com\/pl\/sklep\/\">FiveMX shop<\/a>. For free resources, browse <a href=\"https:\/\/fivemx.com\/pl\/free-fivem-scripts\/\">free FiveM scripts<\/a> and test each resource before using it publicly.<\/p>\n<p><!-- fivemx-quality-depth-v3 --><\/p>\n<h2>Production rollout notes<\/h2>\n<p>Before using this guidance on a live FiveM server, define the exact outcome you expect from the change. For How to Disable AI Planes and Helicopters in FiveM, that means checking which resource, setting, command, or workflow is affected and confirming that the change fits your current framework, artifact version, and server rules. Keep the rollout small enough that you can reverse it quickly if players report errors.<\/p>\n<p>Use a staging server with the same framework, database schema, resource order, and key dependencies as production. If the topic changes gameplay, permissions, visuals, voice, vehicles, maps, inventory, or economy behavior, test with at least one admin account and one normal player account. Watch server console output, client F8 logs, and resource timing while repeating the exact player flow that will happen on the live server.<\/p>\n<h2>Rollback checklist<\/h2>\n<ul>\n<li>Save the previous configuration file, resource folder, and database state before changing anything.<\/li>\n<li>Record the resource version, commit, download page, or setting value you tested.<\/li>\n<li>Restart only the affected resource first when possible, then restart the full server if dependencies require it.<\/li>\n<li>If errors appear, revert the single changed resource or setting before testing another fix.<\/li>\n<\/ul>\n<h2>Maintenance guidance<\/h2>\n<p>Review this setup again after FiveM artifact updates, framework updates, or major resource changes. A configuration that works today can break after dependency updates, renamed exports, changed events, or database migrations. Keep notes with your server documentation so future admins understand what was changed, why it was changed, and how to verify it again.<\/p>\n<p><!-- fivemx-quality-depth-v4 --><\/p>\n<h2>Ongoing review<\/h2>\n<p>Recheck How to Disable AI Planes and Helicopters in FiveM after major FiveM artifact updates, framework changes, or resource migrations. Confirm that the advice still matches current server behavior, that any linked source remains available, and that installation steps still match the files a server owner will actually download or configure.<\/p>\n<p>For public servers, keep a short changelog beside your server documentation. Note what was tested, what changed, which accounts were used for verification, and how to roll back. This makes future maintenance faster and prevents old setup notes from becoming unclear or unsafe for players.<\/p>","protected":false},"excerpt":{"rendered":"<p>Want a cleaner sky and faster gameplay on your FiveM server? Learn how to quickly disable the pesky AI planes and helicopters that clutter airports and boost performance\u2014step\u2011by\u2011step, with a ready\u2011to\u2011use script!<\/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"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/158077","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=158077"}],"version-history":[{"count":2,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/158077\/revisions"}],"predecessor-version":[{"id":208580,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/posts\/158077\/revisions\/208580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media\/158078"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/media?parent=158077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/categories?post=158077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pl\/wp-json\/wp\/v2\/tags?post=158077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}