-
Notifications
You must be signed in to change notification settings - Fork 17
/
cl_env.lua
59 lines (48 loc) · 1.69 KB
/
cl_env.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Utils.CreateLoadedInThread(function()
DisplayRadar(not Config.HIDE_RADAR)
SetBlackout(Config.ENABLE_BLACKOUT)
SetAudioFlag("DisableFlightMusic", true)
SetAudioFlag("PoliceScannerDisabled", true)
StartAudioScene("FBI_HEIST_H5_MUTE_AMBIENCE_SCENE")
if Config.FIRST_PERSON_LOCK then
SetFollowPedCamViewMode(4)
SetFollowVehicleCamViewMode(4)
end
for i = 1, 15 do
EnableDispatchService(i, false)
end
while true do
Wait(0)
local playerId = PlayerId()
HideHudComponentThisFrame(1)
HideHudComponentThisFrame(3)
HideHudComponentThisFrame(4)
HideHudComponentThisFrame(13)
if not Config.ENABLE_PEDS then
SetPedDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
end
if not Config.ENABLE_TRAFFIC then
SetVehicleDensityMultiplierThisFrame(0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
end
if IsPlayerWantedLevelGreater(playerId, 0) then
ClearPlayerWantedLevel(playerId)
end
if Config.FIRST_PERSON_LOCK then
DisableControlAction(0, 0, true)
end
end
end)
Citizen.CreateThread(function()
if Config.ENV_SYNC then
while true do
Wait(10000)
if Config.ENV_SYNC then
NetworkOverrideClockTime(NetworkGetServerTime()) -- Simple time sync
SetWeatherTypeNowPersist("FOGGY") -- TODO: Weather system!!!
end
end
end
end)