-- CONFIG -- -- Blacklisted vehicle models carblacklist = { "RHINO", "Oppressor", "Deluxo", "Oppressor MK II", "Rhino", "Vom Feuer Anti-Aircraft Trailer", "Mobile Operations Center", "APC", "FAV", "Weaponized Tampa", "Ocelot Arden", "HVY Insurgent Pick-Up Custom", "Nightshark", "Karin Technical Custom" , "Technical Custom", "Vigilante", "Avenger", "Barrage", "Chernobog", "Pfister Coment Safari", "Comet Safari", "RCV", "Stormberg", "Khanjali", "Thruster", "Savestra", "Viseris", "Revolter", "Caracara", "Hydra", "P-996 LAZER", "Buzzard", "Skylift", "Hunter" , "Savage", "Volatol", "Cargo Plane", "Cargo", "Defender", "Bombushka", "Tula", "Molotok", "Cargobob", "Vulkan", "Valkyre", } -- CODE -- Citizen.CreateThread(function() while true do Wait(1) playerPed = GetPlayerPed(-1) if playerPed then checkCar(GetVehiclePedIsIn(playerPed, false)) x, y, z = table.unpack(GetEntityCoords(playerPed, true)) for _, blacklistedCar in pairs(carblacklist) do checkCar(GetClosestVehicle(x, y, z, 100.0, GetHashKey(blacklistedCar), 70)) end end end end) function checkCar(car) if car then carModel = GetEntityModel(car) carName = GetDisplayNameFromVehicleModel(carModel) if isCarBlacklisted(carModel) then _DeleteEntity(car) sendForbiddenMessage("This vehicle is blacklisted!") end end end function isCarBlacklisted(model) for _, blacklistedCar in pairs(carblacklist) do if model == GetHashKey(blacklistedCar) then return true end end return false end