forked from qbcore-framework/qb-bankrobbery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsv_config.lua
195 lines (185 loc) · 4.96 KB
/
sv_config.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Config = Config or {}
--- This function gets triggered whenever one or more PowerStations have been hit
--- @param hits array
--- @return nil
function Config.OnPoliceCameraHit(hits)
TriggerClientEvent("police:client:SetCamera", -1, hits, false)
end
--- This is called whenever a bank robbery is started, after a hack is done or a card is used, in this function you can do extra stuff after it has started
--- @param bankId number | string
--- @return nil
function Config.OnRobberyStart(bankId)
local bankName = type(bankId) == "number" and "bankrobbery" or bankId
TriggerEvent('qb-scoreboard:server:SetActivityBusy', bankName, true)
if bankName ~= "bankrobbery" then return end
TriggerEvent('qb-banking:server:SetBankClosed', bankId, true)
end
--- This is called whenever a bank robbery's timeout has ended
--- @param bankId string | number
--- @return nil
function Config.OnRobberyTimeoutEnd(bankId)
local bankName = type(bankId) == "number" and "bankrobbery" or bankId
TriggerEvent('qb-scoreboard:server:SetActivityBusy', bankName, false)
if bankName ~= "bankrobbery" then return end
TriggerEvent('qb-banking:server:SetBankClosed', bankId, false)
end
--- This will be called once a blackout starts or ends
--- @param isBlackout boolean
--- @return nil
function Config.OnBlackout(isBlackout)
if isBlackout then
TriggerClientEvent("police:client:DisableAllCameras", -1)
else
TriggerClientEvent("police:client:EnableAllCameras", -1)
end
end
Config.HitsNeeded = 13 -- The amount of powerstation needed to be hit to cause a blackout
Config.BlackoutTimer = 10 -- The amount of minutes a blackout will take until all power comes back
Config.RewardTypes = {
[1] = {
type = "item"
},
[2] = {
type = "money"
}
}
Config.LockerRewards = {
["tier1"] = {
[1] = {item = "goldchain", minAmount = 5, maxAmount = 15},
},
["tier2"] = {
[1] = {item = "rolex", minAmount = 5, maxAmount = 15},
},
["tier3"] = {
[1] = {item = "goldbar", minAmount = 1, maxAmount = 2},
},
}
Config.LockerRewardsPaleto = {
["tier1"] = {
[1] = {item = "goldchain", minAmount = 10, maxAmount = 20},
},
["tier2"] = {
[1] = {item = "rolex", minAmount = 10, maxAmount = 20},
},
["tier3"] = {
[1] = {item = "goldbar", minAmount = 2, maxAmount = 4},
},
}
Config.LockerRewardsPacific = {
["tier1"] = {
[1] = {item = "goldbar", minAmount = 4, maxAmount = 8},
},
["tier2"] = {
[1] = {item = "goldbar", minAmount = 4, maxAmount = 8},
},
["tier3"] = {
[1] = {item = "goldbar", minAmount = 4, maxAmount = 8},
},
}
Config.CameraHits = {
[1] = {
type = {"police", "bank"},
stationsToHitPolice = {1, 2, 3, 4, 5, 6},
stationsToHitBank = {1, 2, 11}
},
[2] = {
type = {"police", "bank"},
stationsToHitPolice = {1, 2, 3, 4, 5, 6},
stationsToHitBank = {1, 2, 11}
},
[3] = {
type = {"police", "bank"},
stationsToHitPolice = {1, 2, 3, 4, 5, 6},
stationsToHitBank = {4, 5, 6, 8}
},
[4] = {
type = {"police", "bank"},
stationsToHitPolice = {4, 5, 6},
stationsToHitBank = {12, 13}
},
[5] = {
type = {"police", "bank"},
stationsToHitPolice = {4, 5, 6},
stationsToHitBank = {12, 13}
},
[6] = {
type = "police",
stationsToHitPolice = {4, 5, 6}
},
[7] = {
type = "police",
stationsToHitPolice = 3
},
[8] = {
type = "police",
stationsToHitPolice = {4, 5, 6}
},
[9] = {
type = "police",
stationsToHitPolice = {7, 8}
},
[10] = {
type = "police",
stationsToHitPolice = {7, 8}
},
[11] = {
type = "police",
stationsToHitPolice = 9
},
[12] = {
type = "police",
stationsToHitPolice = 9
},
[13] = {
type = "police",
stationsToHitPolice = 9
},
[14] = {
type = "police",
stationsToHitPolice = {9, 10}
},
[15] = {
type = "police",
stationsToHitPolice = {7, 9, 10}
},
[16] = {
type = "police",
stationsToHitPolice = {7, 9, 10}
},
[17] = {
type = "police",
stationsToHitPolice = {9, 10}
},
[18] = {
type = "police",
stationsToHitPolice = 3
},
[19] = {
type = "police",
stationsToHitPolice = {{1, 2, 3}, {9, 10}}
},
[20] = {
type = "police",
stationsToHitPolice = 10
},
[21] = {
type = "police",
stationsToHitPolice = {1, 2, 11}
},
[22] = {
type = "police",
stationsToHitPolice = {1, 2, 11}
},
[23] = {
type = "police",
stationsToHitPolice = {4, 5, 6, 8}
},
[24] = {
type = "police",
stationsToHitPolice = {12, 13}
},
[25] = {
type = "police",
stationsToHitPolice = {12, 13}
}
}