-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77044aa
commit 9b396c3
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
server-data/resources/[esx_addons]/esx_vehicleshop/client/npc.lua
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--Npc_control | ||
CreateThread(function() | ||
while true do | ||
Wait(0) -- imposta 0 per prevenire il crash del server | ||
|
||
-- These natives have to be called every frame. | ||
SetVehicleDensityMultiplierThisFrame(0.1) -- traffic density | ||
SetPedDensityMultiplierThisFrame(0.1) -- set npc/ai peds density to 0 | ||
SetRandomVehicleDensityMultiplierThisFrame(0.1) -- set random vehicles (car scenarios / cars driving off from a parking spot etc.) to 0 | ||
SetParkedVehicleDensityMultiplierThisFrame(0.1) -- set random parked vehicles (parked car scenarios) to 0 | ||
SetScenarioPedDensityMultiplierThisFrame(0.1, 0.1) -- set random npc/ai peds or scenario peds to 0 | ||
SetGarbageTrucks(true) -- 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); | ||
end | ||
end) |