48
48
RegisterNetEvent (' ps-drugprocessing:ChangeTemp' )
49
49
AddEventHandler (' ps-drugprocessing:ChangeTemp' , function ()
50
50
if not isTempChangeU then
51
- exports [" memorygame" ]:thermiteminigame (6 , 3 , 5 , 10 ,
52
- function () -- success
53
- print (" success" )
54
- QBCore .Functions .Notify (' Temperature Increase Successful' , ' success' )
55
- ProcessTempUp ()
56
- end ,
57
- function () -- failure
58
- print (" failure" )
59
- TriggerServerEvent (' ps-drugprocessing:cancelProcessing' )
60
- TriggerServerEvent (' ps-drugprocessing:processFailUp' )
61
- end )
51
+ QBCore .Functions .TriggerCallback (' QBCore:HasItem' , function (result )
52
+ if result then
53
+ print (' You have this item HA' )
54
+ exports [" memorygame" ]:thermiteminigame (6 , 3 , 5 , 10 ,
55
+ function () -- success
56
+ print (" success" )
57
+ QBCore .Functions .Notify (' Temperature Increase Successful' , ' success' )
58
+ ProcessTempUp ()
59
+ end ,
60
+ function () -- failure
61
+ print (" failure" )
62
+ TriggerServerEvent (' ps-drugprocessing:cancelProcessing' )
63
+ TriggerServerEvent (' ps-drugprocessing:processFailUp' )
64
+ end )
65
+ else
66
+ QBCore .Functions .Notify (' You lack some of the required items - Chemical Mix' , ' error' )
67
+ end
68
+ end , ' liquidmix' )
62
69
else
63
70
QBCore .Functions .Notify (' Temperature is Already Hot Enough' , ' error' )
64
71
end
67
74
RegisterNetEvent (' ps-drugprocessing:ChangeTemp2' )
68
75
AddEventHandler (' ps-drugprocessing:ChangeTemp2' , function ()
69
76
if not isTempChangeD then
70
- exports [" memorygame" ]:thermiteminigame (6 , 3 , 5 , 10 ,
71
- function () -- success
72
- print (" success" )
73
- QBCore .Functions .Notify (' Temperature Decrease Successful' , ' success' )
74
- ProcessTempDown ()
75
- end ,
76
- function () -- failure
77
- print (" failure" )
78
- TriggerServerEvent (' ps-drugprocessing:cancelProcessing' )
79
- TriggerServerEvent (' ps-drugprocessing:processFailDown' )
80
- end )
77
+ QBCore .Functions .TriggerCallback (' QBCore:HasItem' , function (result )
78
+ if result then
79
+ print (' You have this item HA' )
80
+ exports [" memorygame" ]:thermiteminigame (6 , 3 , 5 , 10 ,
81
+ function () -- success
82
+ print (" success" )
83
+ QBCore .Functions .Notify (' Temperature Decrease Successful' , ' success' )
84
+ ProcessTempUp ()
85
+ end ,
86
+ function () -- failure
87
+ print (" failure" )
88
+ TriggerServerEvent (' ps-drugprocessing:cancelProcessing' )
89
+ TriggerServerEvent (' ps-drugprocessing:processFailDown' )
90
+ end )
91
+ else
92
+ QBCore .Functions .Notify (' You lack some of the required items - Chemical Vapor' , ' error' )
93
+ end
94
+ end , ' chemicalvapor' )
81
95
else
82
- QBCore .Functions .Notify (' Temperature is Already Hot Enough' , ' error' )
96
+ QBCore .Functions .Notify (' Temperature is Already Cold Enough' , ' error' )
83
97
end
84
98
end )
85
99
100
+
86
101
RegisterNetEvent (' ps-drugprocessing:ProcessProduct' )
87
102
AddEventHandler (' ps-drugprocessing:ProcessProduct' , function ()
88
103
local coords = GetEntityCoords (PlayerPedId (source ))
@@ -326,4 +341,4 @@ function OpenDoorAnimation()
326
341
TaskPlayAnim (ped , " anim@heists@keycard@" , " exit" , 5.0 , 1.0 , - 1 , 16 , 0 , 0 , 0 , 0 )
327
342
Citizen .Wait (400 )
328
343
ClearPedTasks (ped )
329
- end
344
+ end
0 commit comments