-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathclient.lua
More file actions
50 lines (41 loc) · 1.33 KB
/
Copy pathclient.lua
File metadata and controls
50 lines (41 loc) · 1.33 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
local DoesEntityExist = DoesEntityExist
local DeletePed = DeletePed
local CreateThread = CreateThread
player = {}
player.injuries = {}
local hospitals = lib.load("data.hospitals")
local emsJobs = lib.load("config").emsJobs
local clothingScript = lib.load("config").clothingScript
local debug = lib.load("config").debug
local function createZones()
for index, hospital in pairs(hospitals) do
local cfg = hospital
if cfg.blip.enable then
utils.createBlip(cfg.blip)
end
lib.zones.box({
name = 'ars_hospital:' .. index,
coords = cfg.zone.pos,
size = cfg.zone.size,
clothes = clothingScript and cfg.clothes,
debug = debug,
rotation = 0.0,
onEnter = function(self)
initGarage(cfg.garage, emsJobs)
if self.clothes then
initClothes(self.clothes, emsJobs)
end
initParamedic()
end,
onExit = function(self)
for k, v in pairs(peds) do
if DoesEntityExist(v) then
DeletePed(v)
end
end
unloadGarage()
end
})
end
end
CreateThread(createZones)