Skip to content

10% off shop orders, applied at checkoutBlack Friday: 30% off until Dec 1Server templatesServer templates

RPScripts

How to Disable Ambient Planes and Helicopters in FiveM

By Luke

FiveM Helicopters & Airplanes
On this page

To reduce selected ambient aircraft in FiveM, create a client resource that calls SetVehicleModelIsSuppressed for an explicit list of model hashes. This only affects natural spawning of those models; another resource can still create the same aircraft.

This resource and its natives were written for FiveM on GTA V Legacy; check Cfx.re’s Legacy-to-Enhanced changes before running it on an Enhanced server.

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.

Create the resource

Create resources/[local]/ambient_aircraft_control with these two files.

fxmanifest.lua:

fx_version 'cerulean'
game 'gta5'

author 'Your name'
description 'Suppress selected ambient aircraft models'
version '1.0.0'

client_script 'client.lua'

client.lua:

local suppressedModels = {
    `luxor`,
    `shamal`,
    `maverick`,
    `frogger`,
}

CreateThread(function()
    for i = 1, #suppressedModels do
        SetVehicleModelIsSuppressed(suppressedModels[i], true)
    end
end)

AddEventHandler('onResourceStop', function(resourceName)
    if resourceName ~= GetCurrentResourceName() then
        return
    end

    for i = 1, #suppressedModels do
        SetVehicleModelIsSuppressed(suppressedModels[i], false)
    end
end)

The backtick values are CfxLua compile-time hashes. The current runtime and manifest forms are documented by Cfx.re in the CfxLua guide and resource manifest reference.

Choose the scope deliberately

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.

Do not run the native every frame

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 Wait(0) loop adds work without proving better behaviour.

Test before production

  1. Back up the existing traffic or population resource.
  2. Add ensure ambient_aircraft_control on a development server.
  3. Run refresh and ensure ambient_aircraft_control.
  4. Observe known ambient-aircraft locations long enough to compare the same conditions before and after.
  5. Spawn an aircraft through any approved scripted workflow to confirm whether that separate use should remain available.
  6. Stop the resource and verify that its suppression state is reversed.

When suppression is not enough

If another resource repeatedly creates aircraft, change that resource'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.

Reference documentation

Source: citizenfx/natives

  • How to Create a FiveM Loading Screen

    How to Create a FiveM Loading Screen

    A current FiveM loading screen is an NUI resource declared with loadscreen in fxmanifest.lua . Keep the first version local and small: one HTML document, one stylesheet and one script. Add progress or server handover data only after the basic screen opens and closes correctly.

  • How to Write and Check a FiveM fxmanifest.lua

    How to Write and Check a FiveM fxmanifest.lua

    An fxmanifest.lua belongs at the root of a FiveM resource. It declares the supported game, scripts, dependencies and client-delivered files. Choose the example that matches your resource and replace every example filename with a file that actually exists.

  • Customize QBCore Scripts: Configuration, Events and Testing

    Customize QBCore Scripts: Configuration, Events and Testing

    Start with the exact resource you want to change. Read its fxmanifest.lua, configuration and documented exports before editing. Record the installed QBCore and resource revisions, copy the configuration and database to a private test server, and change one behavior at a time.