Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0) -- prevent crashing
- -- These natives have to be called every frame.
- SetPedDensityMultiplierThisFrame(0.0) -- set npc/ai peds density to 0
- SetRandomVehicleDensityMultiplierThisFrame(0.0) -- set random vehicles (car scenarios / cars driving off from a parking spot etc.) to 0
- SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0) -- set random npc/ai peds or scenario peds to 0
- SetGarbageTrucks(false) -- Stop garbage trucks from randomly spawning
- SetRandomBoats(false) -- Stop random boats from spawning in the water.
- SetCreateRandomCops(false) -- disable random cops walking/driving around.
- SetCreateRandomCopsNotOnScenarios(false) -- stop random cops (not in a scenario) from spawning.
- SetCreateRandomCopsOnScenarios(false) -- stop random cops (in a scenario) from spawning.
- local x,y,z = table.unpack(GetEntityCoords(PlayerPedId()))
- ClearAreaOfVehicles(x, y, z, 1000, false, false, false, false, false)
- RemoveVehiclesFromGeneratorsInArea(x - 500.0, y - 500.0, z - 500.0, x + 500.0, y + 500.0, z + 500.0);
- -- fix OneSync NPC
- if IsPedSittingInAnyVehicle(GetPlayerPed(-1)) then
- if GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1),false),-1) == GetPlayerPed(-1) then
- SetVehicleDensityMultiplierThisFrame(0.1)
- SetParkedVehicleDensityMultiplierThisFrame(0.0)
- else
- SetVehicleDensityMultiplierThisFrame(0.0)
- SetParkedVehicleDensityMultiplierThisFrame(0.1)
- end
- else
- SetParkedVehicleDensityMultiplierThisFrame(0.0)
- SetVehicleDensityMultiplierThisFrame(0.1)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement