-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.lua
More file actions
104 lines (87 loc) · 3 KB
/
client.lua
File metadata and controls
104 lines (87 loc) · 3 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
local amount = 4
local ammanettato = false
local failed = false
local done = 0
local liberato = false
local currentPrompt
local created = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if Citizen.InvokeNative(0x3AA24CCC0D451379, PlayerPedId()) then
if not ammanettato then
ammanettato = true
liberato = false
end
elseif not Citizen.InvokeNative(0x3AA24CCC0D451379, PlayerPedId()) then
if ammanettato then
ammanettato = false
liberato = true
failed = false
if currentPrompt ~= nil then
PromptDelete(currentPrompt)
currentPrompt = nil
created = false
end
end
end
if ammanettato then
if not failed then
if created == false and not liberato then
setup2({hint = 'Slegati'})
end
if IsControlJustPressed(0, 0xCEFD9220) then
for i = 1, amount do
if exports["zm_minigame"]:CreateSkillbar(1, "medium") then
done = done +1
else
failed = true
PromptDelete(currentPrompt)
Citizen.Wait(500)
currentPrompt = nil
created = false
break
end
Citizen.Wait(500)
end
if done >= amount and not failed then
liberato = true
failed = false
if currentPrompt ~= nil then
PromptDelete(currentPrompt)
currentPrompt = nil
created = false
end
end
end
end
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if not liberato then
DisableControlAction(0, 0x295175BF, true)
else
Citizen.Wait(500)
end
end
end)
function setup2(prompts)
if currentPrompt == nil then
if created == false then
local str = prompts.hint or ''
local prompt = Citizen.InvokeNative(0x04F97DE45A519419, Citizen.ReturnResultAnyway())
PromptSetControlAction(prompt, 0xCEFD9220)
str = CreateVarString(10, 'LITERAL_STRING', str)
PromptSetText(prompt, str)
PromptSetEnabled(prompt, 1)
PromptSetVisible(prompt, 1)
PromptSetStandardMode(prompt, 1)
PromptRegisterEnd(prompt)
currentPrompt = prompt
created = true
end
end
end