-- Globale Variablen für Bewegungserkennung local isPlayerMoving = true local lastPos = vector3(0,0,0) local positionCheckTimer = 0 CreateThread(function() -- Dispatch vollständig deaktivieren (Cops, Medic, Fire etc.) for i = 1, 15 do EnableDispatchService(i, false) end end) -- Bewegungserkennung CreateThread(function() while true do local playerPed = PlayerPedId() local currentPos = GetEntityCoords(playerPed) -- Prüfen, ob der Spieler sich bewegt hat if #(currentPos - lastPos) < 1.0 then positionCheckTimer = positionCheckTimer + 1 if positionCheckTimer > 5 then -- Nach 5 Sekunden ohne Bewegung isPlayerMoving = false end else isPlayerMoving = true positionCheckTimer = 0 end lastPos = currentPos Wait(1000) -- Jede Sekunde prüfen end end) CreateThread(function() while true do -- Fußgängerdichte beibehalten SetPedDensityMultiplierThisFrame(0.5) SetScenarioPedDensityMultiplierThisFrame(0.5, 0.5) -- Traffic density settings Config.movingTrafficDensity = 0.05 -- Reduced from 0.1 to 0.05 (5% density when moving) Config.stationaryTrafficDensity = 0.05 -- Keeping the same for when stationary SetVehicleDensityMultiplierThisFrame(densityMultiplier) SetRandomVehicleDensityMultiplierThisFrame(densityMultiplier) SetParkedVehicleDensityMultiplierThisFrame(densityMultiplier) SetParkedCarDensityPercentage(densityMultiplier) -- Kein Wanted-Level / Polizei-Eingriffe SetPlayerWantedLevel(PlayerId(), 0, false) ClearPlayerWantedLevel(PlayerId()) SetDispatchCopsForPlayer(PlayerId(), false) DisablePlayerVehicleRewards(PlayerId()) -- Kein Spawn von aggressiven Gangs & Sonderfahrzeugen local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) ClearAreaOfCops(coords.x, coords.y, coords.z, 1000.0) -- Nur spezifische Fahrzeuge entfernen (Notfallfahrzeuge) local peds = GetGamePool("CPed") for _, ped in ipairs(peds) do if DoesEntityExist(ped) and not IsPedAPlayer(ped) then if IsPedInAnyVehicle(ped, false) then local veh = GetVehiclePedIsIn(ped, false) local vehModel = GetEntityModel(veh) for k, v in pairs(Config.vehModels) do if vehModel == GetHashKey(v) then DeleteEntity(veh) DeleteEntity(ped) end end end end end Wait(100) end end) -- Thread für Verkehrsmanagement CreateThread(function() while true do local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) -- Wenn Spieler steht, aggressiver Fahrzeuge in der Nähe entfernen if not isPlayerMoving then local vehicles = GetGamePool("CVehicle") for _, vehicle in ipairs(vehicles) do if DoesEntityExist(vehicle) and not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1)) then local vehCoords = GetEntityCoords(vehicle) local distance = #(coords - vehCoords) -- Wenn Spieler steht, Fahrzeuge in mittlerer Entfernung entfernen if distance > 100.0 and distance < 200.0 then DeleteEntity(vehicle) end end end end -- Normale Entfernung für weit entfernte Fahrzeuge local vehicles = GetGamePool("CVehicle") for _, vehicle in ipairs(vehicles) do if DoesEntityExist(vehicle) and not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1)) then local vehCoords = GetEntityCoords(vehicle) local distance = #(coords - vehCoords) if distance > 250.0 then DeleteEntity(vehicle) end end end Wait(8000) end end)