Blimps and Helicopters are spawning randomly and just crash into the ground

The problems we currently face are, mostly blimps, but helicopters that spawn in the air and just straight-up crash into the ground, disappearing after some time, BUT they are still there just invisible.
Players just crash into invisible walls and die… This is happening since we updated to the latest server version, I honestly do not know why, we have all npcs disabled, scenarios as well, any ideas?

are you using ReducedNPC?If so, it is from the helicopters and blimps’s drivers(which are npc) are despawning.

is there an easy solution to prevent those vehicles from spawning? id like to continue using reducednpcs, maybe theres a new version?

this has started happening to me also, let me know if you figure it out, i dont have that script hes talking about though

We have Atomic Blimps falling out of the Sky onto the ground. This has JUST starting happening yesterday!

Developed a workaround, which simply deletes any flying blimps/planes not controlled/owned by any players in the server. Did a quick test in Grapeseed and it actually worked pretty well, however it definitely requires more testing.

USE AT YOUR OWN RISK
Github Source Code
Github Release

Also - I have no idea, if I am allowed to post download links here. If not, my apologies.

EDIT: LIL_QK’s idea is much better. Use SET_VEHICLE_MODEL_IS_SUPPRESSED.

Mind making it open-source?

Not a problem. I edited my last post.
Also, just a warning, my code is not the prettiest and it might not work as expected (I definitely did not do enough testing) so use it at your own risk.

1 Like

Hi @PeterRameder,

I came up with this code. Tell me if something is wrong.

local blacklistedVehicles = {
    'annihilator',
    'buzzard',
    'buzzard2',
    'cargobob',
    'cargobob2',
    'cargobob3',
    'cargobob4',
    'frogger',
    'frogger2',
    'maverick',
    'savage',
    'skylift',
    'supervolito',
    'supervolito2',
    'swift',
    'swift2',
    'valkyrie',
    'valkyrie2',
    'volatus',
    'blimp',
    'blimp2'
}

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(500)
        for k, v in pairs(blacklistedVehicles) do
            if DoesEntityExist(GetHashKey(v)) then
                DeleteVehicle(v)
            end
        end
    end
end)

Thanks, Cristiano.

Only tested it for a few minutes but it does seem to work as the are no blimps and helicopters spawning.
Thanks for the script!

Better u can use this function:


It will only prevent the “randomly” ones from spawning
1 Like

blimps are still falling off tried to do the blacklist

can u do a tutorial or something?

I fixed the problem by installing the latest recommended version (linux 2431, windows 2430).

1 Like
Citizen.CreateThread(function()

    
    -- Do this every tick.
    while true do
        Citizen.Wait(0) -- these things NEED to run every tick.
        
        -- Traffic and ped density management
        SetTrafficDensity(0.5)
        
    end
end)
function SetTrafficDensity(density)
    SetParkedVehicleDensityMultiplierThisFrame(density)
    SetVehicleDensityMultiplierThisFrame(density)
    SetRandomVehicleDensityMultiplierThisFrame(density)
    SetVehicleModelIsSuppressed(GetHashKey("blimp"), true)
    
end

im completeley new to fivem is there any complete ressource for this i dont know where i should put this code please!!

where u drop this code?