-
Notifications
You must be signed in to change notification settings - Fork 12
/
client.lua
35 lines (34 loc) · 1.11 KB
/
client.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
Citizen.CreateThread(function()
while true do
local ped = PlayerPedId()
local coord = GetEntityCoords(ped)
for k,v in ipairs(Config.WeathersZones) do
if #(coord - v.coord) < v.radius then
SetWeatherTypeNow(v.weathertype)
SetWeatherTypeNowPersist(v.weathertype)
SetOverrideWeather(v.weathertype)
if v.timecycles then
SetTimecycleModifier(v.timecycles)
SetExtraTimecycleModifier(v.extratimecycle)
end
while #(coord - v.coord) < v.radius do
coord = GetEntityCoords(ped)
Wait(1500)
end
Default()
Wait(500)
end
end
Citizen.Wait(1000)
end
end)
function Default()
ClearOverrideWeather()
ClearWeatherTypePersist()
Wait(100)
ClearExtraTimecycleModifier()
ClearTimecycleModifier()
SetOverrideWeather(Config.DefaultWeather)
SetWeatherTypeNow(Config.DefaultWeather)
SetWeatherTypeNowPersist(Config.DefaultWeather)
end