2025-06-07 08:51:21 +02:00
|
|
|
CreateThread(function()
|
|
|
|
-- Dispatch vollständig deaktivieren (Cops, Medic, Fire etc.)
|
|
|
|
for i = 1, 15 do
|
|
|
|
EnableDispatchService(i, false)
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
|
|
|
CreateThread(function()
|
|
|
|
while true do
|
2025-06-29 11:16:50 +02:00
|
|
|
-- Stark reduzierte Fahrzeug- und Fußgängerdichte
|
|
|
|
SetPedDensityMultiplierThisFrame(0.5) -- Von 0.7 auf 0.5 reduziert
|
|
|
|
SetScenarioPedDensityMultiplierThisFrame(0.5, 0.5) -- Von 0.7 auf 0.5 reduziert
|
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
-- Verkehrsdichte auf moderaten Wert setzen
|
|
|
|
SetVehicleDensityMultiplierThisFrame(0.3) -- Von 0.01 auf 0.3 erhöht
|
|
|
|
SetRandomVehicleDensityMultiplierThisFrame(0.3) -- Von 0.01 auf 0.3 erhöht
|
|
|
|
SetParkedVehicleDensityMultiplierThisFrame(0.2) -- Von 0.0 auf 0.2 erhöht
|
|
|
|
|
2025-06-29 11:16:50 +02:00
|
|
|
|
2025-06-07 08:51:21 +02:00
|
|
|
-- 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)
|
2025-06-29 11:16:50 +02:00
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
-- Nur spezifische Fahrzeuge entfernen (Notfallfahrzeuge)
|
2025-06-07 08:51:21 +02:00
|
|
|
local peds = GetGamePool("CPed")
|
|
|
|
for _, ped in ipairs(peds) do
|
|
|
|
if DoesEntityExist(ped) and not IsPedAPlayer(ped) then
|
|
|
|
local model = GetEntityModel(ped)
|
|
|
|
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
|
|
|
|
|
2025-06-29 11:16:50 +02:00
|
|
|
Wait(100) -- Von 500ms auf 100ms reduziert für häufigere Updates
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
-- Thread für Verkehrsmanagement
|
2025-06-29 11:16:50 +02:00
|
|
|
CreateThread(function()
|
|
|
|
while true do
|
|
|
|
-- Zusätzliche Verkehrsbereinigung in größeren Intervallen
|
|
|
|
local playerPed = PlayerPedId()
|
|
|
|
local coords = GetEntityCoords(playerPed)
|
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
-- Entferne nur Fahrzeuge, die sehr weit entfernt sind
|
2025-06-29 11:16:50 +02:00
|
|
|
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)
|
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
-- Fahrzeuge erst bei größerer Entfernung löschen
|
|
|
|
if distance > 300.0 then
|
2025-06-29 11:16:50 +02:00
|
|
|
DeleteEntity(vehicle)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2025-08-12 13:16:48 +02:00
|
|
|
Wait(10000) -- Von 5000 auf 10000 erhöht (alle 10 Sekunden prüfen)
|
2025-06-07 08:51:21 +02:00
|
|
|
end
|
|
|
|
end)
|