Stop certain cars spawning

I have tried to make a small script to stop specific cars spawning. In this case police3

but they still spawn. Could someone point me in the right direction?

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
    SetVehicleModelIsSuppressed(GetHashKey("police3"), true) 
        end
    end
end)

I tried this but they still spawn. Any advice would be greatly appreciated. Thanks in advance

According to the native reference at https://runtime.fivem.net/doc/natives/#_0x0FC2D89AC25A5814, the native SetVehicleModelIsSuppressed is not confirmed to be working at this time

Edit: Alternatively, you could stream a vehicles.meta for the vehicle (police3 in this case) and set the <frequency> and <maxNum> flags to 0.

3 Likes

does anyone know if its working?
I have some problems but i dont know if i need to loop it for sure or if its simply not working at all

Sorry for digging but makes more sense to me as to open a new oneā€¦