-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtraffic.lua
44 lines (37 loc) · 1.69 KB
/
traffic.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- the following values must satisfy the condtions (let x be the frequency)
-- x ≥ 0.0 (0.1 -> 1)
-- x must be a float type
local config = {
pedtraffic = 1.0,
pedFrequency = 1.0,
trafficFrequency = 1.0,
animalFrequency = 1.0,
}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
-- Peds
Citizen.InvokeNative(0xAB0D553FE20A6E25,config.pedtraffic) -- SetAmbientPedDensityMultiplierThisFrame
Citizen.InvokeNative(0x7A556143A1C03898,config.pedtraffic) -- SetScenarioPedDensityMultiplierThisFrame
-- 0x95423627A9CA598E SetScenarioPedDensityThisFrame(configHash )
--Valid configs:
-- BLACKWATER
-- DEFAULT
-- NEWBORDEAUX
-- RHODES
-- STRAWBERRY
-- TUMBLEWEED
-- VALENTINE
-- VANHORN
-- Humans
Citizen.InvokeNative(0xBA0980B5C0A11924,config.pedFrequency) -- SetAmbientHumanDensityMultiplierThisFrame
Citizen.InvokeNative(0x28CB6391ACEDD9DB,config.pedFrequency) -- SetScenarioHumanDensityMultiplierThisFrame
-- Animals
Citizen.InvokeNative(0xC0258742B034DFAF,config.animalFrequency) -- SetAmbientAnimalDensityMultiplierThisFrame
Citizen.InvokeNative(0xDB48E99F8E064E56,config.animalFrequency) -- SetScenarioAnimalDensityMultiplierThisFrame
-- Vehicles
Citizen.InvokeNative(0xFEDFA97638D61D4A,config.trafficFrequency) -- SetParkedVehicleDensityMultiplierThisFrame
Citizen.InvokeNative(0x1F91D44490E1EA0C,config.trafficFrequency) -- SetRandomVehicleDensityMultiplierThisFrame
Citizen.InvokeNative(0x606374EBFC27B133,config.trafficFrequency) -- SetVehicleDensityMultiplierThisFrame
end
end)