-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathclient.lua
232 lines (198 loc) · 8.68 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
local IsAnimated = false
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
--------------------- client parapluie bleu
RegisterNetEvent('esx_extraitems:umbrellablue')
AddEventHandler('esx_extraitems:umbrellablue', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'p_amb_brolly_01'
IsAnimated = true
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('amb@code_human_wander_drinking@beer@male@base')
while not HasAnimDictLoaded('amb@code_human_wander_drinking@beer@male@base') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.10, 0, -0.001, 80.0, 150.0, 200.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "amb@code_human_wander_drinking@beer@male@base", "static", 3.5, -8, -1, 49, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
ClearPedSecondaryTask(playerPed)
DeleteObject(prop)
end
end)
--------------------- client parapluie gris
RegisterNetEvent('esx_extraitems:umbrellagrey')
AddEventHandler('esx_extraitems:umbrellagrey', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'p_amb_brolly_01_s' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('amb@code_human_wander_drinking@beer@male@base')
while not HasAnimDictLoaded('amb@code_human_wander_drinking@beer@male@base') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.10, 0, -0.001, 80.0, 150.0, 200.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "amb@code_human_wander_drinking@beer@male@base", "static", 3.5, -8, -1, 49, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
ClearPedSecondaryTask(playerPed)
DeleteObject(prop)
end
end)
--------------------- partie client valise tactic gris
RegisterNetEvent('esx_extraitems:handbagtacticgrey')
AddEventHandler('esx_extraitems:handbagtacticgrey', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'prop_security_case_01' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('missheistdocksprep1hold_cellphone')
while not HasAnimDictLoaded('missheistdocksprep1hold_cellphone') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.15, 0, 0, 0, 270.0, 60.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "missheistdocksprep1hold_cellphone", "static", 1.0, -1, -1, 50, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
DeleteObject(prop)
ClearPedSecondaryTask(playerPed)
end
end)
--[[------------------- partie client valise tactic noir -- changer l'orientation
RegisterNetEvent('esx_extraitems:handbagtacticblack')
AddEventHandler('esx_extraitems:handbagtacticblack', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
----------------
local prop_name = 'prop_idol_case_02' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('missheistdocksprep1hold_cellphone')
while not HasAnimDictLoaded('missheistdocksprep1hold_cellphone') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.15, 0, 0, 0, 180.0, 90.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "missheistdocksprep1hold_cellphone", "static", 1.0, -1, -1, 50, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
DeleteObject(prop)
ClearPedSecondaryTask(playerPed)
end
end)
--]]
--------------------- partie client Valise vacance tissu
RegisterNetEvent('esx_extraitems:handbagholiday')
AddEventHandler('esx_extraitems:handbagholiday', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'prop_ld_suitcase_01' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('missheistdocksprep1hold_cellphone')
while not HasAnimDictLoaded('missheistdocksprep1hold_cellphone') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.35, 0, 0, 0, 270.0, 60.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "missheistdocksprep1hold_cellphone", "static", 1.0, -1, -1, 50, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
DeleteObject(prop)
ClearPedSecondaryTask(playerPed)
end
end)
--------------------- partie client Valise vacance resitance
RegisterNetEvent('esx_extraitems:handbagholidayhard')
AddEventHandler('esx_extraitems:handbagholidayhard', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'prop_ld_suitcase_02' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('missheistdocksprep1hold_cellphone')
while not HasAnimDictLoaded('missheistdocksprep1hold_cellphone') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.35, 20, 0, 0, 270.0, 60.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "missheistdocksprep1hold_cellphone", "static", 1.0, -1, -1, 50, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
DeleteObject(prop)
ClearPedSecondaryTask(playerPed)
end
end)
--------------------- partie client valise avocat
RegisterNetEvent('esx_extraitems:handbag')
AddEventHandler('esx_extraitems:handbag', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'prop_ld_case_01' --
IsAnimated = true --
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
RequestAnimDict('missheistdocksprep1hold_cellphone')
while not HasAnimDictLoaded('missheistdocksprep1hold_cellphone') do
Citizen.Wait(1)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.15, 0, 0, 0, 270.0, 60.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "missheistdocksprep1hold_cellphone", "static", 1.0, -1, -1, 50, 0, 0, 0, 0)
end)
elseif IsAnimated then
IsAnimated = false
DeleteObject(prop)
ClearPedSecondaryTask(playerPed)
end
end)
RegisterNetEvent('esx_extraitem:bong')
AddEventHandler('esx_extraitem:bong', function()
local playerPed = GetPlayerPed(-1)
if not IsAnimated then
local prop_name = 'prop_bong_01'
local prop_name2 = 'p_cs_lighter_01' --
IsAnimated = true
Citizen.CreateThread(function()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
prop = CreateObject(GetHashKey(prop_name), x, y, z+0.2, true, true, true)
prop2= CreateObject(GetHashKey(prop_name2), x, y, z+0.2, true, true, true)
RequestAnimDict('anim@safehouse@bong')
while not HasAnimDictLoaded('anim@safehouse@bong') do
Citizen.Wait(0)
end
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 57005), 0.10, 0.0, 0, 99.0, 192.0, 180.0, true, true, false, true, 1, true)
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(playerPed, 18905), 0.10, -0.25, 0, 95.0, 190.0, 180.0, true, true, false, true, 1, true)
TaskPlayAnim(playerPed, "anim@safehouse@bong", "bong_stage1", 3.5, -8, -1, 49, 0, 0, 0, 0)
Citizen.Wait(1500)
Citizen.Wait(8000)
IsAnimated = false
DeleteObject(prop)
DeleteObject(prop2)
ClearPedSecondaryTask(playerPed)
TriggerServerEvent('esx_extraitem:bong')
end)
end
end)