forked from Simnation/Main
Update client.lua
This commit is contained in:
parent
c0a9eb2c4b
commit
149ffbc4dd
1 changed files with 11 additions and 15 deletions
|
@ -11,11 +11,11 @@ CreateThread(function()
|
||||||
SetPedDensityMultiplierThisFrame(0.5) -- Von 0.7 auf 0.5 reduziert
|
SetPedDensityMultiplierThisFrame(0.5) -- Von 0.7 auf 0.5 reduziert
|
||||||
SetScenarioPedDensityMultiplierThisFrame(0.5, 0.5) -- Von 0.7 auf 0.5 reduziert
|
SetScenarioPedDensityMultiplierThisFrame(0.5, 0.5) -- Von 0.7 auf 0.5 reduziert
|
||||||
|
|
||||||
-- Verkehrsdichte auf Minimum setzen
|
-- Verkehrsdichte auf moderaten Wert setzen
|
||||||
SetVehicleDensityMultiplierThisFrame(0.01) -- Von 0.1 auf 0.01 reduziert
|
SetVehicleDensityMultiplierThisFrame(0.3) -- Von 0.01 auf 0.3 erhöht
|
||||||
SetRandomVehicleDensityMultiplierThisFrame(0.01) -- Von 0.1 auf 0.01 reduziert
|
SetRandomVehicleDensityMultiplierThisFrame(0.3) -- Von 0.01 auf 0.3 erhöht
|
||||||
SetParkedVehicleDensityMultiplierThisFrame(0.0) -- Bleibt bei 0.0
|
SetParkedVehicleDensityMultiplierThisFrame(0.2) -- Von 0.0 auf 0.2 erhöht
|
||||||
|
|
||||||
|
|
||||||
-- Kein Wanted-Level / Polizei-Eingriffe
|
-- Kein Wanted-Level / Polizei-Eingriffe
|
||||||
SetPlayerWantedLevel(PlayerId(), 0, false)
|
SetPlayerWantedLevel(PlayerId(), 0, false)
|
||||||
|
@ -29,11 +29,7 @@ CreateThread(function()
|
||||||
|
|
||||||
ClearAreaOfCops(coords.x, coords.y, coords.z, 1000.0)
|
ClearAreaOfCops(coords.x, coords.y, coords.z, 1000.0)
|
||||||
|
|
||||||
-- Periodisch Fahrzeuge in der Umgebung entfernen (alle ~10 Sekunden)
|
-- Nur spezifische Fahrzeuge entfernen (Notfallfahrzeuge)
|
||||||
if math.random(1, 100) <= 10 then
|
|
||||||
ClearAreaOfVehicles(coords.x, coords.y, coords.z, 200.0, false, false, false, false, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
local peds = GetGamePool("CPed")
|
local peds = GetGamePool("CPed")
|
||||||
for _, ped in ipairs(peds) do
|
for _, ped in ipairs(peds) do
|
||||||
if DoesEntityExist(ped) and not IsPedAPlayer(ped) then
|
if DoesEntityExist(ped) and not IsPedAPlayer(ped) then
|
||||||
|
@ -56,27 +52,27 @@ CreateThread(function()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Neuer Thread speziell für Verkehrsmanagement
|
-- Thread für Verkehrsmanagement
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
while true do
|
while true do
|
||||||
-- Zusätzliche Verkehrsbereinigung in größeren Intervallen
|
-- Zusätzliche Verkehrsbereinigung in größeren Intervallen
|
||||||
local playerPed = PlayerPedId()
|
local playerPed = PlayerPedId()
|
||||||
local coords = GetEntityCoords(playerPed)
|
local coords = GetEntityCoords(playerPed)
|
||||||
|
|
||||||
-- Entferne Fahrzeuge, die zu weit entfernt sind
|
-- Entferne nur Fahrzeuge, die sehr weit entfernt sind
|
||||||
local vehicles = GetGamePool("CVehicle")
|
local vehicles = GetGamePool("CVehicle")
|
||||||
for _, vehicle in ipairs(vehicles) do
|
for _, vehicle in ipairs(vehicles) do
|
||||||
if DoesEntityExist(vehicle) and not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1)) then
|
if DoesEntityExist(vehicle) and not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1)) then
|
||||||
local vehCoords = GetEntityCoords(vehicle)
|
local vehCoords = GetEntityCoords(vehicle)
|
||||||
local distance = #(coords - vehCoords)
|
local distance = #(coords - vehCoords)
|
||||||
|
|
||||||
-- Fahrzeuge löschen, die weiter als 150 Einheiten entfernt sind
|
-- Fahrzeuge erst bei größerer Entfernung löschen
|
||||||
if distance > 150.0 then
|
if distance > 300.0 then
|
||||||
DeleteEntity(vehicle)
|
DeleteEntity(vehicle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Wait(5000) -- Alle 5 Sekunden prüfen
|
Wait(10000) -- Von 5000 auf 10000 erhöht (alle 10 Sekunden prüfen)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue