big update. i prob broke something, let me know in discord

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-09-24 15:07:41 -07:00
1 parent 009b0a4f4a
commit 028c5f771f
42 files changed
+2042 -3056

No files matched your search

+31 -40
View File
@@ -17,14 +17,7 @@ local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.RequestModelTime)
local tabdealer = CreatePed(0, Ped,Config.buylsdlabkit.x,Config.buylsdlabkit.y,Config.buylsdlabkit.z-1, Config.buylsdlabkit.w, false, false)
Freeze(tabdealer, true, Config.buylsdlabkit.w)
local options = {
{ type = "client", label = "Buy LSD Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(tabdealer, options)
else
exports['qb-target']:AddTargetEntity(tabdealer, {options = options, distance = 2.0})
end
AddSingleModel(tabdealer,{ type = "client", label = "Buy LSD Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buylabkit", distance = 2.0}, tabdealer )
end)
@@ -41,29 +34,25 @@ RegisterNetEvent("md-drugs:client:getdiethylamide", function(data)
TriggerServerEvent('md-drugs:server:getdiethylamide', data.data)
end)
RegisterNetEvent("md-drugs:client:setlsdlabkit")
AddEventHandler("md-drugs:client:setlsdlabkit", function()
RegisterNetEvent("md-drugs:client:setlsdlabkit", function()
if tableout then
Notify(Lang.lsd.tableout, 'error')
TriggerServerEvent('md-drugs:server:getlabkitback')
else
tableout = true
local PedCoords = GetEntityCoords(PlayerPedId())
local loc, head = StartRay()
if not loc then tableout = false TriggerServerEvent('md-drugs:server:getlabkitback') return end
if not progressbar(Lang.lsd.place, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getlabkitback') return end
local labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
local labkit = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false)
SetEntityHeading(labkit, head)
PlaceObjectOnGroundProperly(labkit)
local options = {
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end},
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end},
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(labkit, options)
else
exports['qb-target']:AddTargetEntity(labkit, {options = options})
end
AddMultiModel(labkit, options, labkit)
end
end)
@@ -75,26 +64,23 @@ RegisterNetEvent("md-drugs:client:getlabkitback", function(data)
end)
RegisterNetEvent("md-drugs:client:heatliquid", function(data)
local PedCoords = GetEntityCoords(PlayerPedId())
local PedCoords = GetEntityCoords(data.data)
dict = "scr_ie_svm_technical2"
if not ItemCheck('lysergic_acid') then return end
if not ItemCheck('diethylamide') then return end
if not minigame(2, 8) then
TriggerServerEvent("md-drugs:server:failheating")
DeleteObject(data.data)
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
local dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x, PedCoords.y, PedCoords.z-1, true, false)
loadParticle(dict)
exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
PlaceObjectOnGroundProperly(dirtylabkit)
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
local options = {
{ event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit },
Wait(100)
local options = {
{ event = "md-drugs:client:cleanlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkit}
}
if Config.oxtarget then
exports.ox_target:addLocalEntity(dirtylabkit, options)
else
exports['qb-target']:AddTargetEntity(dirtylabkit, { options = options})
end
AddMultiModel(dirtylabkit, options, nil )
return end
if not progressbar(Lang.lsd.heat, 7000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:heatliquid")
@@ -103,17 +89,22 @@ end)
RegisterNetEvent("md-drugs:client:cleanlabkit", function(data)
if not ItemCheck('cleaningkit') then return end
if not progressbar(Lang.lsd.clean, 4000, 'clean') then return end
tableout = false
TriggerServerEvent("md-drugs:server:removecleaningkit", data.data)
local check = lib.callback.await('md-drugs:server:removecleaningkit')
if check then
local coord = GetEntityCoords(data.data)
DeleteObject(data.data)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z-1, true, false)
PlaceObjectOnGroundProperly(labkit)
local options = {
{ event = "md-drugs:client:heatliquid", icon = "fas fa-box-circle-check", label = "Heat Liquid" , data = labkit, },
{ event = "md-drugs:client:refinequalityacid", icon = "fas fa-box-circle-check", label = "Refine", data = labkit, },
{ event = "md-drugs:client:maketabpaper", icon = "fas fa-box-circle-check", label = "Dab Sheets", data = labkit, },
{ event = "md-drugs:client:getlabkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = labkit, canInteract = function() if tableout then return true end end},
}
AddMultiModel(labkit, options, labkit)
end
end)
RegisterNetEvent("md-drugs:client:resetlsdkit", function(data)
DeleteObject(data)
TriggerEvent("md-drugs:client:setlsdlabkit")
end)
RegisterNetEvent("md-drugs:client:refinequalityacid", function()
if not ItemCheck('lsd_one_vial') then return end
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failrefinequality") return end