Repository navigation
Expand file tree
/
Copy pathclient.lua
More file actions
101 lines (90 loc) · 2.81 KB
/
Copy pathclient.lua
File metadata and controls
101 lines (90 loc) · 2.81 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
CreateThread(function()
for k, v in pairs(Config.NpcAreas) do
if v.type == "sphere" then
lib.zones.sphere({
coords = v.coords,
radius = v.radius,
debug = Config.Debug or v.debug,
name = v.label
})
elseif v.type == "box" then
lib.zones.box({
coords = v.coords,
size = v.radius,
rotation = v.rotation or 0.0,
debug = Config.Debug or v.debug,
name = v.label
})
elseif v.type == "poly" then
lib.zones.poly({
points = v.coords,
thickness = v.radius,
rotation = v.rotation or 0.0,
debug = Config.Debug or v.debug,
name = v.label
})
else
print("Type nicht konfiguriert, Config überprüfen!")
end
end
for k, v in pairs(Config.VehicleAreas) do
if v.type == "sphere" then
lib.zones.sphere({
coords = v.coords,
radius = v.radius,
debug = Config.Debug or v.debug,
name = v.label
})
elseif v.type == "box" then
lib.zones.box({
coords = v.coords,
size = v.radius,
rotation = v.rotation or 0.0,
debug = Config.Debug or v.debug,
name = v.label
})
elseif v.type == "poly" then
lib.zones.poly({
points = v.coords,
thickness = v.radius,
rotation = v.rotation or 0.0,
debug = Config.Debug or v.debug,
name = v.label
})
else
print("Type nicht konfiguriert, Config überprüfen!")
end
end
end)
CreateThread(function()
while true do
for k, v in pairs(Config.NpcAreas) do
ClearAreaOfPeds(
v.coords.x,
v.coords.y,
v.coords.z,
v.radius,
true
)
SetPedDensityMultiplierThisFrame(0.0)
SetScenarioTypeEnabled("WORLD_DEER_GRAZING", false)
SetScenarioTypeEnabled("WORLD_COYOTE_WANDER", false)
SetScenarioTypeEnabled("WORLD_RABBIT", false)
SetScenarioTypeEnabled("WORLD_MOUNTAIN_LION_WANDER", false)
end
for k, v in pairs(Config.VehicleAreas) do
ClearAreaOfVehicles(
v.coords.x,
v.coords.y,
v.coords.z,
v.radius,
false,
false,
false,
false,
false
)
end
Wait(Config.refreshRate)
end
end)