Repository navigation
Expand file tree
/
Copy pathclient.lua
More file actions
126 lines (118 loc) · 4.54 KB
/
Copy pathclient.lua
File metadata and controls
126 lines (118 loc) · 4.54 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
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
--StoreRobbery
function PerformSkillCheck()
local skillcheck = false
if Config.registerSkill == 'ox_lib' then
skillcheck = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 1}, 'medium'}, {'w', 'a', 's', 'd'})
elseif Config.registerSkill == 'ps-ui' then
exports['ps-ui']:Scrambler(function(success)
skillcheck = success
end, "numeric", 30, 0)
elseif Config.registerSkill == 'boii' then
exports['boii_minigames']:wire_cut({
style = 'default',
timer = 60000
}, function(success)
skillcheck = success
end)
end
return skillcheck
end
RegisterNetEvent('StoreRobbery')
AddEventHandler('StoreRobbery', function()
local policeCount = GlobalState.police or 0
local state = GlobalState.GettingRobbed
if state == false then
if policeCount >= Config.policeCount then
local skillcheck = PerformSkillCheck()
if skillcheck then
if lib.progressBar({
duration = 20000,
label = 'Grabbing Cash',
useWhileDead = false,
canCancel = true,
disable = {car = true,},
anim = {dict = 'anim@heists@ornate_bank@grab_cash', clip = 'grab'}, flag = 3})
then
TriggerServerEvent("FinishRobbery")
else
TriggerServerEvent("FailRobbery")
end
else
TriggerServerEvent("FailRobbery")
end
else
lib.notify({
id = 'some_identifier',
title = 'Notifcation',
description = 'Not a good time to be stealing',
position = 'top',
duration = 5000,
style = {
backgroundColor = '#141517',
color = '#909296'
},
icon = 'ban',
iconColor = '#C53030'
})
end
else
print('slow down')
end
end)
function PerformSkillCheckSafe()
local skillchecksafe = false
if Config.safeSkill == 'ox_lib' then
skillchecksafe = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 1}, 'medium'}, {'w', 'a', 's', 'd'})
elseif Config.safeSkill == 'ps-ui' then
exports['ps-ui']:Maze(function(success)
if success then
skillchecksafe = success
end
end, 20) -- Hack Time Limit
elseif Config.safeSkill == 'boii' then
exports['boii_minigames']:safe_crack({
style = 'default',
difficulty = 5
}, function(success)
if success then
skillchecksafe = success
end
end)
end
return skillchecksafe
end
RegisterNetEvent('SafeRobbery')
AddEventHandler('SafeRobbery', function()
local policeCount = GlobalState.police or 0
if policeCount >= Config.policeCount then
local result = PerformSkillCheckSafe()
if result then
if lib.progressBar({
duration = 20000,
label = 'Robbing Safe',
useWhileDead = false,
canCancel = false,
disable = {car = true,},
anim = {dict = 'anim@heists@ornate_bank@grab_cash', clip = 'grab'}, flag = 3})
then
TriggerServerEvent("FinishSafeRobbery")
end
else
TriggerServerEvent("FailRobbery")
end
else
lib.notify({
id = 'lolwhat',
title = 'Notifcation',
description = 'Not a good time to be stealing',
position = 'top',
duration = 5000,
style = {
backgroundColor = '#141517',
color = '#909296'
},
icon = 'ban',
iconColor = '#C53030'
})
end
end)