Last active
November 6, 2018 11:37
-
-
Save pauliusdotpro/9b691fdcb1022439a1bfb785917296fe to your computer and use it in GitHub Desktop.
Disables all autospawning vehicles, peds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Citizen.CreateThread(function() | |
while true | |
do | |
-- These natives has to be called every frame. | |
SetVehicleDensityMultiplierThisFrame(0.0) | |
SetPedDensityMultiplierThisFrame(0.0) | |
SetRandomVehicleDensityMultiplierThisFrame(0.0) | |
SetParkedVehicleDensityMultiplierThisFrame(0.0) | |
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0) | |
local playerPed = GetPlayerPed(-1) | |
local pos = GetEntityCoords(playerPed) | |
RemoveVehiclesFromGeneratorsInArea(pos['x'] - 500.0, pos['y'] - 500.0, pos['z'] - 500.0, pos['x'] + 500.0, pos['y'] + 500.0, pos['z'] + 500.0); | |
-- These natives do not have to be called everyframe. | |
SetGarbageTrucks(0) | |
SetRandomBoats(0) | |
Citizen.Wait(1) | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment