-
Notifications
You must be signed in to change notification settings - Fork 14
/
client.lua
173 lines (137 loc) · 5.19 KB
/
client.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
--MADE BY DareToDoyle#3835--
ESX = nil
local ketEffects = false
local meldoninEffects = false
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
end
end)
RegisterNetEvent('D2D-Stims:adrenaline')
AddEventHandler('D2D-Stims:adrenaline', function()
local player = PlayerPedId()
ESX.Streaming.RequestAnimDict('mp_arresting', function()
TaskPlayAnim(PlayerPedId(), 'mp_arresting', 'a_uncuff', 8.0, 2.0, 1200, 48, 10, 0, 0, 0)
SendNUIMessage({sound = "stimshot", volume = 0.2})
Citizen.Wait(2500)
ESX.ShowNotification('Adrenaline Stimulant has been taken!')
AnimpostfxPlay("SuccessFranklin", 0, false)
ShakeGameplayCam("DRUNK_SHAKE", 0.3)
AnimpostfxStopAll()
SetEntityHealth(player, GetEntityMaxHealth(player))
Citizen.Wait(25000) -- HOW LONG THE EFFECT LASTS (25 seconds)
SendNUIMessage({sound = "heartbeat", volume = 0.6})
ESX.ShowNotification('The effects of the Adrenaline Stimulant have now gone.')
ShakeGameplayCam("DRUNK_SHAKE", 0.0)
end)
end)
RegisterNetEvent('D2D-Stims:meldonin')
AddEventHandler('D2D-Stims:meldonin', function()
local player = PlayerPedId()
ESX.Streaming.RequestAnimDict('mp_arresting', function()
TaskPlayAnim(PlayerPedId(), 'mp_arresting', 'a_uncuff', 8.0, 2.0, 1200, 48, 10, 0, 0, 0)
SendNUIMessage({sound = "stimshot", volume = 0.2})
Citizen.Wait(2500)
ESX.ShowNotification('Meldonin Stimulant has been taken!')
AnimpostfxPlay("SuccessFranklin", 0, false)
meldoninEffects = true
ShakeGameplayCam("DRUNK_SHAKE", 0.3)
AnimpostfxStopAll()
Citizen.Wait(25000) -- HOW LONG THE EFFECT LASTS (25 seconds)
SendNUIMessage({sound = "heartbeat", volume = 0.6})
meldoninEffects = false
ESX.ShowNotification('The effects of the Meldonin Stimulant have now gone.')
ShakeGameplayCam("DRUNK_SHAKE", 0.0)
end)
end)
RegisterNetEvent('D2D-Stims:anesthetic')
AddEventHandler('D2D-Stims:anesthetic', function()
local player = PlayerPedId()
ESX.Streaming.RequestAnimDict('mp_arresting', function()
TaskPlayAnim(PlayerPedId(), 'mp_arresting', 'a_uncuff', 8.0, 2.0, 1200, 48, 10, 0, 0, 0)
SendNUIMessage({sound = "stimshot", volume = 0.2})
Citizen.Wait(2500)
ESX.ShowNotification('Anesthetic Stimulant has been taken!')
AnimpostfxPlay("SuccessFranklin", 0, false)
ShakeGameplayCam("DRUNK_SHAKE", 0.3)
AnimpostfxStopAll()
SetPedArmour(player, 100)
Citizen.Wait(25000) -- HOW LONG THE EFFECT LASTS (25 seconds)
SendNUIMessage({sound = "heartbeat", volume = 0.6})
ESX.ShowNotification('The effects of the Anesthetic Stimulant have now gone.')
ShakeGameplayCam("DRUNK_SHAKE", 0.0)
end)
end)
RegisterNetEvent('D2D-Stims:ketamine')
AddEventHandler('D2D-Stims:ketamine', function()
local player = PlayerPedId()
ESX.Streaming.RequestAnimDict('mp_arresting', function()
TaskPlayAnim(PlayerPedId(), 'mp_arresting', 'a_uncuff', 8.0, 2.0, 1200, 48, 10, 0, 0, 0)
SendNUIMessage({sound = "stimshot", volume = 0.2})
Citizen.Wait(1500)
SendNUIMessage({sound = "ketamine", volume = 0.5})
Citizen.Wait(500)
ESX.ShowNotification('Ketamine has been taken!')
AnimpostfxPlay("SuccessFranklin", 0, false)
ShakeGameplayCam("DRUNK_SHAKE", 0.3)
ketEffects = true
disco = true
Citizen.Wait(25000) -- HOW LONG THE EFFECT LASTS (25 seconds)
SendNUIMessage({sound = "heartbeat", volume = 0.6})
disco = false
AnimpostfxStopAll()
ShakeGameplayCam("DRUNK_SHAKE", 0.0)
ketEffects = false
ESX.ShowNotification('The effects of the Ketamine have now gone.')
end)
end)
-- Effect Functions (You can play around with this if you know what you're doing)
Citizen.CreateThread(function()
while true do
Citizen.Wait(50)
if meldoninEffects == true then
SetPedMoveRateOverride(PlayerId(),10.0)
SetRunSprintMultiplierForPlayer(PlayerId(),1.49)
RestorePlayerStamina(PlayerId(), 1.0)
elseif meldoninEffects == false then
SetPedMoveRateOverride(PlayerId(),1.0)
SetRunSprintMultiplierForPlayer(PlayerId(),1.0)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(50)
if ketEffects == true then
RequestAnimSet("MOVE_M@DRUNK@VERYDRUNK")
SetPedMovementClipset(GetPlayerPed(-1), "MOVE_M@DRUNK@VERYDRUNK", 1.0)
elseif ketEffects == false then
ResetPedMovementClipset(GetPlayerPed(-1))
ResetPedWeaponMovementClipset(GetPlayerPed(-1))
ResetPedStrafeClipset(GetPlayerPed(-1))
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if disco == true then
AnimpostfxPlay("PPOrange", 0, false)
Citizen.Wait(600)
AnimpostfxStopAll()
AnimpostfxPlay("PPGreen", 0, false)
Citizen.Wait(600)
AnimpostfxStopAll()
AnimpostfxPlay("PPPink", 0, false)
Citizen.Wait(600)
AnimpostfxStopAll()
AnimpostfxPlay("PPPurple", 0, false)
Citizen.Wait(600)
AnimpostfxStopAll()
elseif disco == false then
end
end
end)
--MADE BY DareToDoyle#3835--