
How to Disable AI Planes & Helicopters in FiveM
How to Disable Airplanes and Helicopters in FiveM
FiveM servers can become bogged down by artificial intelligence (AI) aircraft that randomly spawn at airports and airfields. Whether you’re running a realistic utopia or a post‑apocalyptic sandbox, those AI planes and helicopters can degrade performance, interfere with gameplay, and clash with your server’s 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.
Why Disabling AI Planes and Helicopters Matters
– Improved Server Performance – Fewer entities mean less CPU and memory usage, freeing resources for other scripts and assets.
– Cleaner Gameplay – Protect missions and role‑play scenarios from unplanned air traffic.
– Thematic Coherence – A sandbox set in a destroyed city can feel more authentic when no airplanes drift overhead.
– Reduced Lag – AI aircraft are resource-intensive. Knocking them out of the equation can lower ping and increase frame rates for your players.
Disabling AI Planes and Helicopters with the gd_airport_ai_begone Script
The gd_airport_ai_begone 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.
Step‑by‑Step Implementation
1. Create a Resource Folder
Navigate to your server’s `resources` directory and create a new folder named `gd_airport_ai_begone`.
2. Add a Manifest File
Inside that directory, create either `__resource.lua` (for legacy servers) or, better yet, `fxmanifest.lua` if you use the latest server version:
“`lua
fx_version ‘cerulean’
game ‘gta5’
client_script ‘client.lua’
“`
3. Write the Client Side Script
Create `client.lua` and paste the following:
“`lua
Citizen.CreateThread(function()
local SCENARIO_TYPES = {
WORLD_VEHICLE_MILITARY_PLANES_SMALL,
WORLD_VEHICLE_MILITARY_PLANES_BIG
}
local SCENARIO_GROUPS = {
2017590552, — LSIA planes
2141866469, — Sandy Shores planes
1409640232, — Grapeseed planes
ng_planes — jets “high” in the sky
}
local SUPPRESSED_MODELS = {
SHAMAL, LUXOR, LUXOR2, JET,
LAZER, TITAN, BARRACKS, BARRACKS2,
CRUSADER, RHINO, AIRTUG, RIPLEY
}
while true do
for _, type in pairs(SCENARIO_TYPES) do
SetScenarioTypeEnabled(type, false)
end
for _, group in pairs(SCENARIO_GROUPS) do
SetScenarioGroupEnabled(group, false)
end
for _, model in pairs(SUPPRESSED_MODELS) do
SetVehicleModelIsSuppressed(GetHashKey(model), true)
end
Citizen.Wait(10000) — Re‑evaluate every 10 seconds
end
end)
“`
The script revolves around three arrays: SCENARIO_TYPES (small and large military planes), SCENARIO_GROUPS (airport‑based spawn pools), and SUPPRESSED_MODELS (specific aircraft and support vehicles). Adjust these lists if you wish to re‑enable particular models.
4. Load the Resource
Open `server.cfg` and add:
“`
start gd_airport_ai_begone
“`
Save and close.
5. Restart
Reboot the server or run the console command `restart gd_airport_ai_begone` to activate the new script.
Customizing the Script
If you’re on a mixed‑traffic 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.
Best Practices
– Back Up – Before touching any server files, make a copy of your current configuration and scripts.
– Test Thoroughly – Once the server is running, hop into each airport area to confirm no unwanted aircraft appear.
– Monitor Resource Usage – Use tools like the FiveM console’s `stats` command or external monitoring software to verify that CPU usage has decreased after disabling AI planes.
– Keep Scripts Updated – If FiveM changes the underlying spawning mechanics, you may need to tweak scenario names or model hashes.
Conclusion
By adding the gd_airport_ai_begone 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’s 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.
Stay in the Loop
Get the latest FiveM tutorials, mod releases, and exclusive updates delivered to your inbox.
No spam. Unsubscribe anytime.