diff --git a/client/cornerselling.lua b/client/cornerselling.lua index de0aeef..341ed17 100644 --- a/client/cornerselling.lua +++ b/client/cornerselling.lua @@ -193,9 +193,6 @@ local function SellToPed(ped) end) end end, - canInteract = function() - if IsEntityDead(ped) == false then return true end - end }, { icon = 'fas fa-x', @@ -305,4 +302,4 @@ RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items) cornerselling = false LocalPlayer.state:set("inv_busy", false, true) end -end) +end) \ No newline at end of file diff --git a/client/crafter.lua b/client/crafter.lua new file mode 100644 index 0000000..3b2951d --- /dev/null +++ b/client/crafter.lua @@ -0,0 +1,203 @@ +QBCore = exports['qb-core']:GetCoreObject() + +CreateThread(function() + if Config.Crafting then + for k, v in pairs (Config.Craftinglocation) do + if v.job == "" or v.job == '' or v.job == nil then + v.job = 1 + end + if v.gang == "" or v.gang == '' or v.gang == nil then + v.gang = 1 + end + if v.targetlabel == '' or v.targetlabel == "" or v.targetlabel == nil then + v.targetlabel = 'Craft' + end + if v.icon == '' or v.icon == "" or v.icon == nil then + v.icon = "fa-solid fa-hammer" + end + exports['qb-target']:AddBoxZone("mdcraft" .. k,v.location,1.5, 1.75, { + name = "mdcraft"..k, + heading = 156.0, + debugPoly = false, + minZ = v.location.z-2, + maxZ = v.location.z+2, + }, { + options = { + { + icon = v.icon, + label = v.targetlabel, + event = 'md-drugs:client:craftingmenu', + craft = v.Craftstation, + canInteract = function() + if QBCore.Functions.GetPlayerData().job.name == v.job or v.job == 1 and QBCore.Functions.GetPlayerData().gang.name == v.gang or v.gang == 1 then + return true end + end, + + }, + + }, + }) +end +end +end) + +RegisterNetEvent("md-drugs:client:craftingmenu", function(data) + local craftingmenu = {} + local text = "" + local headertext = "" + local desc = "" + if Config.Oxmenu then + for k, v in pairs (data.craft) do + if v.requireditem == '' or v.requireditem == "" or v.requireditem == nil then + text = v.ingredienttext + else + text = v.ingredienttext .. " Needs: " .. v.requireditem .. "" + end + if v.amount == '' or v.amount == "" or v.amount == nil then + headertext = QBCore.Shared.Items[k].label + else + headertext = QBCore.Shared.Items[k].label .. " X " .. v.amount + end + Wait(0) + craftingmenu[#craftingmenu + 1] = { + icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[k].image, + header = k, + title = headertext, + description = text, + event = "md-drugs:client:craft", + args = { + table = data.craft, + item = k, + skillxp = v.skillxp, + xp = v.xp, + recipe = v.recipe, + text = v.ingredienttext, + max = v.max, + success = v.successchance, + skill = v.skill, + emote = v.emote, + lvlreq = v.lvlreq, + animtime = v.animtime, + requireditem = v.requireditem, + amount = v.amount, + progressbar = v.progressbar, + + } + } + lib.registerContext({id = 'craftingmenu',title = "Mining Crafting", options = craftingmenu}) + lib.showContext('craftingmenu') + + end + else + for k, v in pairs (data.craft) do + if v.requireditem == '' or v.requireditem == "" or v.requireditem == nil then + text = v.ingredienttext + else + text = v.ingredienttext .. " Needs: " .. v.requireditem .. "" + end + if v.amount == '' or v.amount == "" or v.amount == nil then + headertext = QBCore.Shared.Items[k].label + else + headertext = QBCore.Shared.Items[k].label .. " X " .. v.amount + end + craftingmenu[#craftingmenu + 1] = { + icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[k].image, + header = headertext, + txt = text, + params = { + event = "md-drugs:client:craft", + args = { + table = data.craft, + item = k, + skillxp = v.skillxp, + xp = v.xp, + recipe = v.recipe, + text = v.ingredienttext, + max = v.max, + success = v.successchance, + skill = v.skill, + emote = v.emote, + lvlreq = v.lvlreq, + animtime = v.animtime, + requireditem = v.requireditem, + amount = v.amount, + progressbar = v.progressbar, + } + } + } + end + exports['qb-menu']:openMenu(craftingmenu) + end + +end) + +RegisterNetEvent("md-drugs:client:craft", function(data) +if data.lvlreq == nil then data.lvlreq = 0 end +if data.max == nil then data.max = 1 end +if data.animtime == nil then data.animtime = 4000 end +if data.skill == nil then data.skill = 'drugprocessing' end +if data.skillxp == nil then data.skillxp = 'drugprocessingxp' end +if data.xp == nil then data.xp = Config.defaultxp end +if data.success == nil then data.success = 100 end +if data.amount == nil then data.amount = 1 end +if data.progressbar == nil then data.progressbar = "Crafting" end +local progressbarlabel = data.progressbar +local lvl = QBCore.Functions.GetPlayerData().metadata[data.skill] +if QBCore.Functions.GetPlayerData().items == data.requireditem or data.requireditem == nil then +if lvl >= data.lvlreq then + if Config.Oxmenu then + local dialog = exports.ox_lib:inputDialog(QBCore.Shared.Items[data.item].label .."!", { + { type = 'number', label = data.text, min = 0, max = data.max, default = 1 }, + }) + if data.emote == nil then + TriggerEvent('animations:client:EmoteCommandStart', {"uncuff"}) + else + TriggerEvent('animations:client:EmoteCommandStart', {data.emote}) + end + QBCore.Functions.Progressbar("pick_cane"," ".. progressbarlabel.. "!", data.animatime, false, true, { + disableMovement = true, + disableCarMovement = true, + disableMouse = false, + disableCombat = true, + },{},{}, {}, function() + ClearPedTasks(PlayerPedId()) + TriggerServerEvent("md-drugs:server:crafting2", dialog[1], data.item, data.xp, data.success, data.table, data.skillxp, data.skill, data.amount) + end) + else + local dialog = exports['qb-input']:ShowInput({ + header = QBCore.Shared.Items[data.item].label, + submitText = "Amount To Make", + inputs = { + { + text = "Max Of " .. data.max, + name = "number", + type = "number", + isRequired = true, + min = 0, + max = data.max, + } + } + }) + if tonumber(dialog.number) > data.max then + dialog.number = data.max + end + if data.emote == nil then + TriggerEvent('animations:client:EmoteCommandStart', {"uncuff"}) + else + TriggerEvent('animations:client:EmoteCommandStart', {data.emote}) + end + QBCore.Functions.Progressbar("pick_cane", " ".. progressbarlabel.. "!", data.animtime, false, true, { + disableMovement = true, + disableCarMovement = true, + disableMouse = false, + disableCombat = true, + },{},{}, {}, function() + ClearPedTasks(PlayerPedId()) + TriggerServerEvent("md-drugs:server:crafting2", tonumber(dialog.number), data.item, data.xp, data.success, data.table, data.skillxp, data.skill, data.amount ) + end) + end + else + QBCore.Functions.Notify("You Need To Be Level " .. data.lvlreq .. " In " .. data.skill .. " To Craft This") + end +end +end) \ No newline at end of file diff --git a/client/heroin.lua b/client/heroin.lua index db297fc..2794960 100644 --- a/client/heroin.lua +++ b/client/heroin.lua @@ -142,7 +142,7 @@ end) RegisterNetEvent("md-drugs:client:dryplant") AddEventHandler("md-drugs:client:dryplant", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -157,7 +157,7 @@ end) RegisterNetEvent("md-drugs:client:cutheroin") AddEventHandler("md-drugs:client:cutheroin", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -172,7 +172,7 @@ end) RegisterNetEvent("md-drugs:client:buyheroinlabkit") AddEventHandler("md-drugs:client:buyheroinlabkit", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -188,7 +188,7 @@ end) RegisterNetEvent("md-drugs:client:setheroinlabkit") AddEventHandler("md-drugs:client:setheroinlabkit", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) ClearPedTasks(PlayerPedId()) heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) SetVehicleOnGroundProperly(heroinlabkit) @@ -213,7 +213,7 @@ end) RegisterNetEvent("md-drugs:client:heatliquidheroin") AddEventHandler("md-drugs:client:heatliquidheroin", function() local PedCoords = GetEntityCoords(PlayerPedId()) -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) exports['ps-ui']:Circle(function(success) if success then TriggerServerEvent("md-drugs:server:heatliquidheroin") @@ -277,7 +277,7 @@ end) RegisterNetEvent("md-drugs:client:fillneedle") AddEventHandler("md-drugs:client:fillneedle", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, { disableMovement = false, disableCarMovement = false, diff --git a/client/lsd.lua b/client/lsd.lua index 295b012..1fd3a4e 100644 --- a/client/lsd.lua +++ b/client/lsd.lua @@ -30,7 +30,7 @@ end) RegisterNetEvent("md-drugs:client:getlysergic") AddEventHandler("md-drugs:client:getlysergic", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, { disableMovement = false, disableCarMovement = false, @@ -50,7 +50,7 @@ end) RegisterNetEvent("md-drugs:client:getdiethylamide") AddEventHandler("md-drugs:client:getdiethylamide", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, { disableMovement = false, disableCarMovement = false, @@ -71,7 +71,7 @@ end) RegisterNetEvent("md-drugs:client:setlsdlabkit") AddEventHandler("md-drugs:client:setlsdlabkit", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, { disableMovement = false, disableCarMovement = false, @@ -115,7 +115,7 @@ end) RegisterNetEvent("md-drugs:client:getlabkitback") AddEventHandler("md-drugs:client:getlabkitback", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) local PedCoords = GetEntityCoords(PlayerPedId()) QBCore.Functions.Progressbar("drink_something", "Packing Up", 1000, false, true, { disableMovement = false, @@ -133,7 +133,7 @@ end) RegisterNetEvent("md-drugs:client:heatliquid") AddEventHandler("md-drugs:client:heatliquid", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) local PedCoords = GetEntityCoords(PlayerPedId()) dict = "scr_ie_svm_technical2" QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, { @@ -196,7 +196,7 @@ end) RegisterNetEvent("md-drugs:client:refinequalityacid") AddEventHandler("md-drugs:client:refinequalityacid", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, { disableMovement = false, disableCarMovement = false, @@ -217,7 +217,7 @@ end) RegisterNetEvent("md-drugs:client:maketabpaper") AddEventHandler("md-drugs:client:maketabpaper", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, { disableMovement = false, disableCarMovement = false, @@ -239,7 +239,7 @@ end) RegisterNetEvent("md-drugs:client:cutsheet") AddEventHandler("md-drugs:client:cutsheet", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -253,7 +253,7 @@ end) RegisterNetEvent("md-drugs:client:buytabs") AddEventHandler("md-drugs:client:buytabs", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -268,7 +268,7 @@ end) RegisterNetEvent("md-drugs:client:buylabkit") AddEventHandler("md-drugs:client:buylabkit", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, { disableMovement = false, disableCarMovement = false, diff --git a/client/mescaline.lua b/client/mescaline.lua index b7b982a..f08e41c 100644 --- a/client/mescaline.lua +++ b/client/mescaline.lua @@ -121,7 +121,7 @@ end) RegisterNetEvent("md-drugs:client:drymescaline") AddEventHandler("md-drugs:client:drymescaline", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, { disableMovement = false, disableCarMovement = false, diff --git a/client/meth.lua b/client/meth.lua index 759705a..a457235 100644 --- a/client/meth.lua +++ b/client/meth.lua @@ -5,20 +5,20 @@ local heated = nil CreateThread(function() - BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject() - BikerMethLab.Style.Set(BikerMethLab.Style.upgrade) - BikerMethLab.Security.Set(BikerMethLab.Security.upgrade) - BikerMethLab.Details.Enable(BikerMethLab.Details.production, true) - RefreshInterior(BikerMethLab.interiorId) + BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject() + BikerMethLab.Style.Set(BikerMethLab.Style.upgrade) + BikerMethLab.Security.Set(BikerMethLab.Security.upgrade) + BikerMethLab.Details.Enable(BikerMethLab.Details.production, true) + RefreshInterior(BikerMethLab.interiorId) end) CreateThread(function() - exports['qb-target']:AddBoxZone("methteleout", Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 +exports['qb-target']:AddBoxZone("methteleout",Config.MethTeleIn, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 name = "methteleout", heading = 11.0, debugPoly = false, - minZ = Config.MethTeleIn.z - 2, - maxZ = Config.MethTeleIn.z + 2, + minZ = Config.MethTeleIn.z-2, + maxZ = Config.MethTeleIn.z+2, }, { options = { { @@ -26,19 +26,19 @@ CreateThread(function() icon = "fas fa-sign-in-alt", label = "Enter Building", action = function() - SetEntityCoords(PlayerPedId(), Config.MethTeleOut) + SetEntityCoords(PlayerPedId(),Config.MethTeleOut) end, }, }, distance = 2.5 }) - exports['qb-target']:AddBoxZone("methtelein", Config.MethTeleOut, 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 +exports['qb-target']:AddBoxZone("methtelein",Config.MethTeleOut,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 name = "methtelein", heading = 11.0, debugPoly = false, - minZ = Config.MethTeleOut.z - 2, - maxZ = Config.MethTeleOut.z + 2, + minZ = Config.MethTeleOut.z-2, + maxZ = Config.MethTeleOut.z+2, }, { options = { { @@ -46,19 +46,19 @@ CreateThread(function() icon = "fas fa-sign-in-alt", label = "Exit Building", action = function() - SetEntityCoords(PlayerPedId(), Config.MethTeleIn) + SetEntityCoords(PlayerPedId(),Config.MethTeleIn) end, }, }, distance = 2.5 }) - exports['qb-target']:AddBoxZone("maze", vector3(-95.55, -806.73, 44.04), 1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 +exports['qb-target']:AddBoxZone("maze",vector3(-95.55, -806.73, 44.04),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 name = "maze", heading = 11.0, debugPoly = false, - minZ = 44 - 2, - maxZ = 44 + 2, + minZ = 44-2, + maxZ = 44+2, }, { options = { { @@ -66,153 +66,150 @@ CreateThread(function() icon = "fas fa-sign-in-alt", label = "dont click this", action = function() - SetEntityCoords(PlayerPedId(), vector3(-75.36, -837.24, 318.93)) + SetEntityCoords(PlayerPedId(),vector3(-75.36, -837.24, 318.93)) end, }, }, distance = 2.5 }) - local itemreqcook = { "ephedrine", "acetone" } - exports['qb-target']:AddBoxZone("ingridientsmeth", vector3(1005.7, -3201.28, -39.55), 1.5, 1.75, - { -- 963.37, .z-2122.95, 31.47 - name = "ingridientsmeth", - heading = 11.0, - debugPoly = false, - minZ = -39 - 2, - maxZ = -39 + 2, - }, { + local itemreqcook = {"ephedrine", "acetone"} +exports['qb-target']:AddBoxZone("ingridientsmeth",vector3(1005.7, -3201.28, -39.55),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 + name = "ingridientsmeth", + heading = 11.0, + debugPoly = false, + minZ = -39-2, + maxZ = -39+2, + }, { options = { { - name = 'methcook', - icon = "fas fa-sign-in-alt", - label = "Cook Meth", - item = itemreqcook, - action = function() - if amonia == nil then - amonia = true - TriggerServerEvent("md-drugs:server:startcook") - MethCooking() - exports['qb-target']:AddBoxZone("adjustdials", vector3(1007.89, -3201.17, -38.99), 1.5, 1.75, - { -- 963.37, .z-2122.95, 31.47 - name = "adjustdials", - heading = 11.0, - debugPoly = false, - minZ = -39 - 2, - maxZ = -39 + 2, - }, { - options = { - { - name = 'adjustdials', - icon = "fas fa-sign-in-alt", - label = "Adjust Dials", - distance = 5, - action = function() - if amonia == true then - exports['ps-ui']:Circle(function(success) - if success then - QBCore.Functions.Notify("Increasing Heat", "success") - ClearPedTasks(PlayerPedId()) - heated = true - exports['qb-target']:RemoveZone("adjustdials") - else - AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) - ClearPedTasks(PlayerPedId()) - amonia = nil - exports['qb-target']:RemoveZone("adjustdials") - end - end, 2, 8) -- NumberOfCircles, - else - end - end, - }, - }, - }) + name = 'methcook', + icon = "fas fa-sign-in-alt", + label = "Cook Meth", + item = itemreqcook, + action = function() + if amonia == nil then + amonia = true + TriggerServerEvent("md-drugs:server:startcook") + MethCooking() + exports['qb-target']:AddBoxZone("adjustdials",vector3(1007.89, -3201.17, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 + name = "adjustdials", + heading = 11.0, + debugPoly = false, + minZ = -39-2, + maxZ = -39+2, + }, { + options = { + { + name = 'adjustdials', + icon = "fas fa-sign-in-alt", + label = "Adjust Dials", + distance = 5, + action = function() + if amonia == true then + exports['ps-ui']:Circle(function(success) + if success then + QBCore.Functions.Notify("Increasing Heat", "success") + ClearPedTasks(PlayerPedId()) + heated = true + exports['qb-target']:RemoveZone("adjustdials") + else + AddExplosion(1005.773, -3200.402, -38.524, 49, 10, true, false, true, true) + ClearPedTasks(PlayerPedId()) + amonia = nil + exports['qb-target']:RemoveZone("adjustdials") + end + end, 2, 8) -- NumberOfCircles, + else + end + end, + }, + }, + }) + else QBCore.Functions.Notify("Theres Stuff Inside", "error") end - end, + end, canInteract = function() - if amonia == nil then + if amonia == nil then return true end end, }, { - name = 'grabtray', - icon = "fas fa-sign-in-alt", - label = "Grab Tray", - distance = 5, - action = function() - if amonia then - local pos = GetEntityCoords(PlayerPedId(), true) - RequestAnimDict('anim@heists@box_carry@') - while (not HasAnimDictLoaded('anim@heists@box_carry@')) do - Wait(7) - end - TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, - false) - RequestModel("bkr_prop_meth_tray_02a") - while not HasModelLoaded("bkr_prop_meth_tray_02a") do - Wait(0) - end - local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) - AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2, - -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) - tray = true - exports['qb-target']:AddBoxZone("boxmeth", vector3(1012.15, -3194.04, -39.20), 1.5, 1.75, - { -- 963.37, .z-2122.95, 31.47 - name = "boxmeth", - heading = 3.0, - debugPoly = false, - minZ = -39 - 2, - maxZ = -39 + 2, - }, { - options = { - { - name = 'boxmeth', - icon = "fas fa-sign-in-alt", - label = "Box Up Meth", - distance = 5, - action = function() - if tray then - tray = false - DeleteObject(trays) - local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) - SetEntityHeading(bucket, 90.0) - SmashMeth() - exports['qb-target']:RemoveZone("boxmeth") - exports['qb-target']:AddTargetEntity(bucket, { - options = { - { - name = 'bucket', - icon = 'fa-solid fa-car', - label = 'Bag Meth', - action = function() - DeleteObject(bucket) - amonia = nil - heated = nil - tray = nil - BagMeth() - TriggerServerEvent('md-drugs:server:getmeth') - end, + name = 'grabtray', + icon = "fas fa-sign-in-alt", + label = "Grab Tray", + distance = 5, + action = function() + if amonia then + local pos = GetEntityCoords(PlayerPedId(), true) + RequestAnimDict('anim@heists@box_carry@') + while (not HasAnimDictLoaded('anim@heists@box_carry@')) do + Wait(7) + end + TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false) + RequestModel("bkr_prop_meth_tray_02a") + while not HasModelLoaded("bkr_prop_meth_tray_02a") do + Wait(0) + end + local trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true) + AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01,-0.2, -0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true) + tray = true + exports['qb-target']:AddBoxZone("boxmeth",vector3(1012.04, -3194.96, -38.99),1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 + name = "boxmeth", + heading = 11.0, + debugPoly = false, + minZ = -38-2, + maxZ = -38+2, + }, { + options = { + { + name = 'boxmeth', + icon = "fas fa-sign-in-alt", + label = "Box Up Meth", + distance = 5, + action = function() + if tray then + tray = false + DeleteObject(trays) + local bucket = CreateObject(`bkr_prop_meth_bigbag_03a`, vector3(1012.85, -3194.29, -39.2), true, true, true) + SetEntityHeading(bucket, 90.0) + SmashMeth() + exports['qb-target']:RemoveZone("boxmeth") + exports['qb-target']:AddTargetEntity(bucket, { + options = { + { + name = 'bucket', + icon = 'fa-solid fa-car', + label = 'Bag Meth', + action = function() + DeleteObject(bucket) + amonia = nil + heated = nil + tray = nil + BagMeth() + TriggerServerEvent('md-drugs:server:getmeth') + end, - } - }, - }) + } + }, + }) end - end, + end, canInteract = function() if tray then return true end - end, - }, + end, }, - }) - end - end, - canInteract = function() - if heated and amonia and tray == nil then return true end + }, + }) + end end, + canInteract = function() + if heated and amonia and tray == nil then return true end + + end, }, }, distance = 2.5 @@ -220,23 +217,23 @@ CreateThread(function() end) CreateThread(function() - local current = "g_m_y_famdnf_01" +local current = "g_m_y_famdnf_01" lib.requestModel(current, 1000) local CurrentLocation = Config.MethHeistStart - methdealer = CreatePed(0, current, CurrentLocation.x, CurrentLocation.y, CurrentLocation.z - 1, false, false) - FreezeEntityPosition(methdealer, true) - SetEntityHeading(methdealer, 220.0) - SetEntityInvincible(methdealer, true) - exports['qb-target']:AddTargetEntity(methdealer, { - options = { - { - label = "Get Mission", - icon = "fas fa-eye", - action = function() - SpawnMethCarPedChase() - QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success") - end, - }, - } - }) + methdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false) + FreezeEntityPosition(methdealer, true) + SetEntityHeading(methdealer,220.0) + SetEntityInvincible(methdealer, true) + exports['qb-target']:AddTargetEntity(methdealer, { + options = { + { + label = "Get Mission", + icon = "fas fa-eye", + action = function() + SpawnMethCarPedChase() + QBCore.Functions.Notify("Car Has Been Marked On Your Map", "success") + end, + }, + } + }) end) diff --git a/client/pharma.lua b/client/pharma.lua index 0e974a2..5796b51 100644 --- a/client/pharma.lua +++ b/client/pharma.lua @@ -42,7 +42,7 @@ end) RegisterNetEvent("md-drugs:client:givevicodinprescription") AddEventHandler("md-drugs:client:givevicodinprescription", function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -56,7 +56,7 @@ AddEventHandler("md-drugs:client:givevicodinprescription", function() end) RegisterNetEvent("md-drugs:client:giveadderalprescription") AddEventHandler("md-drugs:client:giveadderalprescription", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -71,7 +71,7 @@ end) RegisterNetEvent("md-drugs:client:givemorphineprescription") AddEventHandler("md-drugs:client:givemorphineprescription", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -85,7 +85,7 @@ TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) end) RegisterNetEvent("md-drugs:client:givexanaxprescription") AddEventHandler("md-drugs:client:givexanaxprescription", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -100,7 +100,7 @@ end) RegisterNetEvent("md-drugs:client:fillprescription") AddEventHandler("md-drugs:client:fillprescription", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -115,7 +115,7 @@ end) RegisterNetEvent("md-drugs:client:openingvicodin") AddEventHandler("md-drugs:client:openingvicodin", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { disableMovement = false, disableCarMovement = false, diff --git a/client/target.lua b/client/target.lua index bae6e86..1d7e49a 100644 --- a/client/target.lua +++ b/client/target.lua @@ -46,21 +46,6 @@ if Config.oxtarget then }, }, }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = vector3(1087.16, -3195.46, -38.99), - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makepowder", - icon = "fas fa-sign-in-alt", - label = "chop it up", - - }, - }, - }) exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 coords = vector3(1093.01, -3194.8, -38.99), size = vec3(2,2,2), @@ -136,81 +121,9 @@ if Config.oxtarget then }, }) ------ heroin - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.dryplant, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:dryplant", - icon = "fas fa-sign-in-alt", - label = "Dry out", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.cutheroinone, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:cutheroin", - icon = "fas fa-sign-in-alt", - label = "Cut Heroin", - - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.fillneedle, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:fillneedle", - icon = "fas fa-sign-in-alt", - label = "Fill Needles", - - }, - }, - }) + ------- crack - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.makecrack, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makecrackone", - icon = "fas fa-sign-in-alt", - label = "cook some crack", - }, - }, - }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.bagcrack, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:bagcrack", - icon = "fas fa-sign-in-alt", - label = "bag some crack", - - }, - }, - }) + ------- pharma exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 coords = Config.FillPrescription, @@ -241,21 +154,6 @@ if Config.oxtarget then } }) ------------ mescaline - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.DryOut, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:drymescaline", - icon = "fas fa-sign-in-alt", - label = "Dry Out", - - }, - }, - }) exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 coords = Config.isosafrole, size = vec3(2,2,2), @@ -284,20 +182,7 @@ if Config.oxtarget then }, }, }) - exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 - coords = Config.rawxtcloc, - size = vec3(2,2,2), - debugPoly = false, - rotation = 45, - options = { - { - type = "client", - event = "md-drugs:client:makingrawxtc", - icon = 'fas fa-eye', - label = 'Make Raw XTC', - }, - }, - }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 coords = Config.buypress, size = vec3(2,2,2), @@ -344,7 +229,127 @@ if Config.oxtarget then }, }, }) - --------------------------------------- XTC + if Config.Crafting then + else + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.makecrack, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:makecrackone", + icon = "fas fa-sign-in-alt", + label = "cook some crack", + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.bagcrack, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:bagcrack", + icon = "fas fa-sign-in-alt", + label = "bag some crack", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = vector3(1087.16, -3195.46, -38.99), + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:makepowder", + icon = "fas fa-sign-in-alt", + label = "chop it up", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.dryplant, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:dryplant", + icon = "fas fa-sign-in-alt", + label = "Dry out", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.cutheroinone, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:cutheroin", + icon = "fas fa-sign-in-alt", + label = "Cut Heroin", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.fillneedle, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:fillneedle", + icon = "fas fa-sign-in-alt", + label = "Fill Needles", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.DryOut, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:drymescaline", + icon = "fas fa-sign-in-alt", + label = "Dry Out", + + }, + }, + }) + exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47 + coords = Config.rawxtcloc, + size = vec3(2,2,2), + debugPoly = false, + rotation = 45, + options = { + { + type = "client", + event = "md-drugs:client:makingrawxtc", + icon = 'fas fa-eye', + label = 'Make Raw XTC', + }, + }, + }) + end else exports['qb-target']:AddBoxZone("coketelein",Config.CokeTeleIn,1.5, 1.75, { -- 963.37, -2122.95, 31.47 @@ -393,23 +398,6 @@ else }, }, }) - exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "makepowder", - heading = 156.0, - debugPoly = false, - minZ = Config.MakePowder.z-2, - maxZ = Config.MakePowder.z+2, -}, { - options = { - { - type = "client", - event = "md-drugs:client:makepowder", - icon = "fas fa-sign-in-alt", - label = "chop it up", - - }, - }, - }) ----- LSD exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47 name = "getlysergic", @@ -463,7 +451,149 @@ else }, distance = 2.5 }) - exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + + exports['qb-target']:AddBoxZone("pharmapresc",Config.FillPrescription,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "pharmapresc", + heading = 156.0, + debugPoly = false, + minZ = Config.FillPrescription.z-2, + maxZ = Config.FillPrescription.z+2, + }, { + options = { + { + type = "client", + event = "md-drugs:client:fillprescription", + icon = "fas fa-sign-in-alt", + label = "Fill Prescription", + + }, + }, + distance = 2.5 + }) + -------------- oxy run + exports['qb-target']:AddBoxZone("getoxytruck",Config.Payfortruck,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 + name = "getoxytruck", + heading = 11.0, + debugPoly = false, + minZ = Config.Payfortruck.z-2, + maxZ = Config.Payfortruck.z+2, + }, { + options = { + { + event = "md-drugs:client:getoxytruck", + icon = "fas fa-sign-in-alt", + label = "Pay For Truck", + }, + } + }) + --------------------------------------- XTC + exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "stealisosafrole2", + heading = 156.0, + debugPoly = false, + minZ = Config.isosafrole.z-2, + maxZ = Config.isosafrole.z+2, + }, { + options = { + { + type = "client", + event = "md-drugs:client:stealisosafrole", + icon = 'fas fa-sign-in-alt', + label = 'Steal Isosafrole', + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "stealmdp2p", + heading = 156.0, + debugPoly = false, + minZ = Config.mdp2p.z-2, + maxZ = Config.mdp2p.z+2, + }, { + options = { + { + type = "client", + event = "md-drugs:client:stealmdp2p", + icon = 'fas fa-eye', + label = 'Steal mdp2p', + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "buypress", + heading = 156.0, + debugPoly = false, + minZ = Config.buypress.z-2, + maxZ = Config.buypress.z+2, + }, { + options = { + { + type = "client", + event = "md-drugs:client:buypress", + icon = 'fas fa-eye', + label = 'Buy Press', + }, + }, + distance = 2.5 + }) + + exports['qb-target']:AddBoxZone("stampwhite",Config.stamp,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "stampwhite", + heading = 156.0, + debugPoly = false, + minZ = Config.stamp.z-2, + maxZ = Config.stamp.z+2, + }, { + options = { + { + type = "client", + event = "md-drugs:client:stampwhite", + icon = 'fas fa-eye', + label = 'Make White Stamped Pills', + }, + { + type = "client", + event = "md-drugs:client:stampred", + icon = 'fas fa-eye', + label = 'Make Red Stamped Pills', + }, + { + type = "client", + event = "md-drugs:client:stamporange", + icon = 'fas fa-eye', + label = 'Make Orange Stamped Pills', + }, + { + type = "client", + event = "md-drugs:client:stampblue", + icon = 'fas fa-eye', + label = 'Make Blue Stamped Pills', + }, + }, + distance = 2.5 + }) + if Config.Crafting then + else + exports['qb-target']:AddBoxZone("makepowder",Config.MakePowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "makepowder", + heading = 156.0, + debugPoly = false, + minZ = Config.MakePowder.z-2, + maxZ = Config.MakePowder.z+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:makepowder", + icon = "fas fa-sign-in-alt", + label = "chop it up", + + }, + }, + }) + exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47 name = "dryplant", heading = 156.0, debugPoly = false, @@ -554,26 +684,7 @@ else }, distance = 2.5 }) - exports['qb-target']:AddBoxZone("pharmapresc",Config.FillPrescription,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "pharmapresc", - heading = 156.0, - debugPoly = false, - minZ = Config.FillPrescription.z-2, - maxZ = Config.FillPrescription.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:fillprescription", - icon = "fas fa-sign-in-alt", - label = "Fill Prescription", - - }, - }, - distance = 2.5 - }) - ----------------------------------------- mescaline - exports['qb-target']:AddBoxZone("drymescaline",Config.DryOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + exports['qb-target']:AddBoxZone("drymescaline",Config.DryOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47 name = "drymescaline", heading = 11.0, debugPoly = false, @@ -591,58 +702,7 @@ else }, distance = 2.5 }) - -------------- oxy run - exports['qb-target']:AddBoxZone("getoxytruck",Config.Payfortruck,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 - name = "getoxytruck", - heading = 11.0, - debugPoly = false, - minZ = Config.Payfortruck.z-2, - maxZ = Config.Payfortruck.z+2, - }, { - options = { - { - event = "md-drugs:client:getoxytruck", - icon = "fas fa-sign-in-alt", - label = "Pay For Truck", - }, - } - }) - --------------------------------------- XTC - exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stealisosafrole2", - heading = 156.0, - debugPoly = false, - minZ = Config.isosafrole.z-2, - maxZ = Config.isosafrole.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stealisosafrole", - icon = 'fas fa-sign-in-alt', - label = 'Steal Isosafrole', - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stealmdp2p", - heading = 156.0, - debugPoly = false, - minZ = Config.mdp2p.z-2, - maxZ = Config.mdp2p.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stealmdp2p", - icon = 'fas fa-eye', - label = 'Steal mdp2p', - }, - }, - distance = 2.5 - }) - exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47 name = "makerawxtc", heading = 156.0, debugPoly = false, @@ -659,58 +719,6 @@ else }, distance = 2.5 }) - exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "buypress", - heading = 156.0, - debugPoly = false, - minZ = Config.buypress.z-2, - maxZ = Config.buypress.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:buypress", - icon = 'fas fa-eye', - label = 'Buy Press', - }, - }, - distance = 2.5 - }) - - exports['qb-target']:AddBoxZone("stampwhite",Config.stamp,1.5, 1.75, { -- 963.37, -2122.95, 31.47 - name = "stampwhite", - heading = 156.0, - debugPoly = false, - minZ = Config.stamp.z-2, - maxZ = Config.stamp.z+2, - }, { - options = { - { - type = "client", - event = "md-drugs:client:stampwhite", - icon = 'fas fa-eye', - label = 'Make White Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampred", - icon = 'fas fa-eye', - label = 'Make Red Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stamporange", - icon = 'fas fa-eye', - label = 'Make Orange Stamped Pills', - }, - { - type = "client", - event = "md-drugs:client:stampblue", - icon = 'fas fa-eye', - label = 'Make Blue Stamped Pills', - }, - }, - distance = 2.5 - }) + end end end) diff --git a/client/travellingmerchant.lua b/client/travellingmerchant.lua index 14f3be7..7382414 100644 --- a/client/travellingmerchant.lua +++ b/client/travellingmerchant.lua @@ -65,7 +65,7 @@ local ShopMenu = {} for k, v in pairs (Config.Items.items) do ShopMenu[#ShopMenu + 1] = { - icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, + icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[v.name].image, header = v.label, title = v.label, event = "md-drugs:client:travellingmerchantox", diff --git a/client/weed.lua b/client/weed.lua index f7bf6d0..97528bc 100644 --- a/client/weed.lua +++ b/client/weed.lua @@ -227,6 +227,8 @@ options = { }, }, }) +if Config.Crafting then +else exports['qb-target']:AddBoxZone("MakeButter",Config.MakeButter,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 name = "MakeButter", heading = 11.0, @@ -240,7 +242,7 @@ options = { icon = "fas fa-sign-in-alt", label = "Make Butter", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Canna Butter", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -271,7 +273,7 @@ options = { label = "Make Brownies", item = "cannabutter", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Special Brownies", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -302,7 +304,7 @@ options = { label = "Make Cookies", item = "cannabutter", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Special Cookies", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -333,7 +335,7 @@ options = { label = "Make Chocolate", item = "cannabutter", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Special Chocolate", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -364,7 +366,7 @@ options = { label = "Make Muffin", item = "cannabutter", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Special Muffin", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -391,6 +393,7 @@ options = { }, }, }) +end exports['qb-target']:AddBoxZone("makeoil",Config.MakeOil,1.5, 1.75, { -- 963.37, .z-2122.95, 31.47 name = "makeoil", heading = 11.0, @@ -404,7 +407,7 @@ options = { icon = "fas fa-sign-in-alt", label = "Make Oil", action = function() - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Wax Oil", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -500,15 +503,15 @@ RegisterNetEvent('md-drugs:client:bluntwraps', function(args) end) RegisterNetEvent("md-drugs:client:rollanim", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart('uncuff', 0) Wait(4000) -ClearPedTasks(PlayerPedId()) +exports["rpemotes"]:EmoteCancel(forceCancel) end) RegisterNetEvent("md-drugs:client:dodabs", function() - TriggerEvent('animations:client:EmoteCommandStart', {'bong2'}) +exports["rpemotes"]:EmoteCommandStart('bong2', 0) AlienEffect() end) @@ -552,7 +555,7 @@ local CurrentLocation = vector3(1030.46, -3203.63, -38.2) }) for k, v in pairs (Config.Weed.items) do WeedShop[#WeedShop + 1] = { - icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image, + icon = "nui://".."ps-inventory/html/images/"..QBCore.Shared.Items[v.name].image, header = v.label, title = v.label, event = "md-drugs:client:WeedShop", @@ -586,7 +589,7 @@ RegisterNetEvent("md-drugs:client:WeedShop", function(data) end) RegisterNetEvent('md-drugs:client:smokeblunts', function(itemName) - TriggerEvent('animations:client:EmoteCommandStart', {'smoke'}) + exports["rpemotes"]:EmoteCommandStart('smoke', 0) TriggerEvent("evidence:client:SetStatus", "widepupils", 300) Wait(1000) if itemName == "blunts" then diff --git a/client/wholesale.lua b/client/wholesale.lua index d614b1b..da24538 100644 --- a/client/wholesale.lua +++ b/client/wholesale.lua @@ -64,7 +64,7 @@ end) RegisterNetEvent("md-drugs:client:successsalecoke") AddEventHandler("md-drugs:client:successsalecoke", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -82,7 +82,7 @@ end) RegisterNetEvent("md-drugs:client:setupcoke") AddEventHandler("md-drugs:client:setupcoke", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -155,7 +155,7 @@ end) RegisterNetEvent("md-drugs:client:successsalecrack") AddEventHandler("md-drugs:client:successsalecrack", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -173,7 +173,7 @@ end) RegisterNetEvent("md-drugs:client:setupcrack") AddEventHandler("md-drugs:client:setupcrack", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -247,7 +247,7 @@ end) RegisterNetEvent("md-drugs:client:successsaleheroin") AddEventHandler("md-drugs:client:successsaleheroin", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -263,7 +263,7 @@ end) RegisterNetEvent("md-drugs:client:setupheroin") AddEventHandler("md-drugs:client:setupheroin", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -334,7 +334,7 @@ end) RegisterNetEvent("md-drugs:client:successsalelsd") AddEventHandler("md-drugs:client:successsalelsd", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -350,7 +350,7 @@ end) RegisterNetEvent("md-drugs:client:setuplsd") AddEventHandler("md-drugs:client:setuplsd", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -423,7 +423,7 @@ end) RegisterNetEvent("md-drugs:client:successsalextc") AddEventHandler("md-drugs:client:successsalextc", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -440,7 +440,7 @@ end) RegisterNetEvent("md-drugs:client:setupxtc") AddEventHandler("md-drugs:client:setupxtc", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, { disableMovement = false, disableCarMovement = false, diff --git a/client/xtc.lua b/client/xtc.lua index 4682269..df46eff 100644 --- a/client/xtc.lua +++ b/client/xtc.lua @@ -3,11 +3,34 @@ local QBCore = exports['qb-core']:GetCoreObject() RegisterNetEvent("md-drugs:client:setpressquad") AddEventHandler("md-drugs:client:setpressquad", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) Wait(4000) ClearPedTasks(PlayerPedId()) quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) PlaceObjectOnGroundProperly(quadpress) + if Config.Crafting then + exports['qb-target']:AddTargetEntity(quadpress, { + options = { + { + event = "md-drugs:client:craftingmenu", + icon = 'fas fa-eye', + label = 'Press Pills', + craft = Config.Craft.quadpress, + + }, + { + + icon = "fas fa-eye", + label = "Pick Up", + action = function() + if DeleteObject(quadpress) then + TriggerServerEvent("md-drugs:server:getquadpressback") + end + end + }, + } + }) + else exports['qb-target']:AddTargetEntity(quadpress, { options = { { @@ -33,22 +56,50 @@ local PedCoords = GetEntityCoords(PlayerPedId()) label = 'Make blue quad Stack', }, { - event = "md-drugs:client:getquadpressback", + icon = "fas fa-eye", label = "Pick Up", + action = function() + if DeleteObject(quadpress) then + TriggerServerEvent("md-drugs:server:getquadpressback") + end + end }, } }) +end end) RegisterNetEvent("md-drugs:client:setpresstriple") AddEventHandler("md-drugs:client:setpresstriple", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) Wait(4000) ClearPedTasks(PlayerPedId()) triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) PlaceObjectOnGroundProperly(triplepress) + if Config.Crafting then + exports['qb-target']:AddTargetEntity(triplepress, { + options = { + { + event = "md-drugs:client:craftingmenu", + icon = 'fas fa-eye', + label = 'Press Pills', + craft = Config.Craft.triplepress, + + }, + { + icon = "fas fa-eye", + label = "Pick Up", + action = function() + if DeleteObject(triplepress) then + TriggerServerEvent("md-drugs:server:gettriplepressback") + end + end + }, + } + }) + else exports['qb-target']:AddTargetEntity(triplepress, { options = { { @@ -72,22 +123,51 @@ local PedCoords = GetEntityCoords(PlayerPedId()) label = 'Make blue triple Stack', }, { - event = "md-drugs:client:gettriplepressback", + icon = "fas fa-eye", label = "Pick Up", + action = function() + if DeleteObject(triplepress) then + TriggerServerEvent("md-drugs:server:gettriplepressback") + end + end }, } }) + end end) RegisterNetEvent("md-drugs:client:setpressdual") AddEventHandler("md-drugs:client:setpressdual", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) Wait(4000) ClearPedTasks(PlayerPedId()) dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) PlaceObjectOnGroundProperly(dualpress) + if Config.Crafting then + exports['qb-target']:AddTargetEntity(dualpress, { + options = { + { + event = "md-drugs:client:craftingmenu", + icon = 'fas fa-eye', + label = 'Press Pills', + craft = Config.Craft.dualpress, + + }, + { + + icon = "fas fa-eye", + label = "Pick Up", + action = function() + if DeleteObject(dualpress) then + TriggerServerEvent("md-drugs:server:getdualpressback") + end + end + }, + } + }) + else exports['qb-target']:AddTargetEntity(dualpress, { options = { { @@ -114,22 +194,46 @@ local PedCoords = GetEntityCoords(PlayerPedId()) label = 'Make blue dual Stack', }, { - event = "md-drugs:client:getdualpressback", + icon = "fas fa-eye", label = "Pick Up", + action = function() + if DeleteObject(dualpress) then + TriggerServerEvent("md-drugs:server:getdualpressback") + end + end }, } }) +end end) RegisterNetEvent("md-drugs:client:setpresssingle") AddEventHandler("md-drugs:client:setpresssingle", function() local PedCoords = GetEntityCoords(PlayerPedId()) - TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) + exports["rpemotes"]:EmoteCommandStart("uncuff", 0) Wait(4000) ClearPedTasks(PlayerPedId()) singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false) PlaceObjectOnGroundProperly(singlepress) + if Config.Crafting then + exports['qb-target']:AddTargetEntity(singlepress, { + options = { + { + event = "md-drugs:client:craftingmenu", + icon = 'fas fa-eye', + label = 'Press Pills', + craft = Config.Craft.singlepress, + + }, + { + event = "md-drugs:client:getsinglepressback", + icon = "fas fa-eye", + label = "Pick Up", + }, + } + }) + else exports['qb-target']:AddTargetEntity(singlepress, { options = { { @@ -157,12 +261,18 @@ local PedCoords = GetEntityCoords(PlayerPedId()) }, { - event = "md-drugs:client:getsinglepressback", + icon = "fas fa-eye", label = "Pick Up", + action = function() + if DeleteObject(singlepress) then + TriggerServerEvent("md-drugs:server:getsinglepressback") + end + end }, } }) +end end) RegisterNetEvent("md-drugs:client:getsinglepressback") @@ -195,7 +305,7 @@ end) RegisterNetEvent("md-drugs:client:stealisosafrole") AddEventHandler("md-drugs:client:stealisosafrole", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -217,7 +327,7 @@ end) RegisterNetEvent("md-drugs:client:stealmdp2p") AddEventHandler("md-drugs:client:stealmdp2p", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -239,7 +349,7 @@ end) RegisterNetEvent("md-drugs:client:makingrawxtc") AddEventHandler("md-drugs:client:makingrawxtc", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -261,7 +371,7 @@ end) ---------------------------- unstamped just xtc RegisterNetEvent("md-drugs:client:makextcsingle") AddEventHandler("md-drugs:client:makextcsingle", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -283,7 +393,7 @@ end) RegisterNetEvent("md-drugs:client:makextcdual") AddEventHandler("md-drugs:client:makextcdual", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -306,7 +416,7 @@ end) RegisterNetEvent("md-drugs:client:makextctriple") AddEventHandler("md-drugs:client:makextctriple", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -330,7 +440,7 @@ end) RegisterNetEvent("md-drugs:client:makextcquad") AddEventHandler("md-drugs:client:makextcquad", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -354,7 +464,7 @@ end) ------------------------------------------------- RegisterNetEvent("md-drugs:client:makeredxtcsingle") AddEventHandler("md-drugs:client:makeredxtcsingle", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -378,7 +488,7 @@ end) RegisterNetEvent("md-drugs:client:makeredxtcdual") AddEventHandler("md-drugs:client:makeredxtcdual", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -402,7 +512,7 @@ end) RegisterNetEvent("md-drugs:client:makeredxtctriple") AddEventHandler("md-drugs:client:makeredxtctriple", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -426,7 +536,7 @@ end) RegisterNetEvent("md-drugs:client:makeredxtcquad") AddEventHandler("md-drugs:client:makeredxtcquad", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -450,7 +560,7 @@ end) --------------------------------------------------------------- making orange unstamped RegisterNetEvent("md-drugs:client:makeorangextcsingle") AddEventHandler("md-drugs:client:makeorangextcsingle", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -474,7 +584,7 @@ end) RegisterNetEvent("md-drugs:client:makeorangextcdual") AddEventHandler("md-drugs:client:makeorangextcdual", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -498,7 +608,7 @@ end) RegisterNetEvent("md-drugs:client:makeorangextctriple") AddEventHandler("md-drugs:client:makeorangextctriple", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -522,7 +632,7 @@ end) RegisterNetEvent("md-drugs:client:makeorangextcquad") AddEventHandler("md-drugs:client:makeorangextcquad", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -546,7 +656,7 @@ end) --------------------------------------- blue unstamped RegisterNetEvent("md-drugs:client:makebluextcsingle") AddEventHandler("md-drugs:client:makebluextcsingle", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -570,7 +680,7 @@ end) RegisterNetEvent("md-drugs:client:makebluextcdual") AddEventHandler("md-drugs:client:makebluextcdual", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -594,7 +704,7 @@ end) RegisterNetEvent("md-drugs:client:makebluextctriple") AddEventHandler("md-drugs:client:makebluextctriple", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -618,7 +728,7 @@ end) RegisterNetEvent("md-drugs:client:makebluextcquad") AddEventHandler("md-drugs:client:makebluextcquad", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -642,7 +752,7 @@ end) ------------------------------------------------------------------ Stamping RegisterNetEvent("md-drugs:client:stampwhite") AddEventHandler("md-drugs:client:stampwhite", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -666,7 +776,7 @@ end) RegisterNetEvent("md-drugs:client:stampred") AddEventHandler("md-drugs:client:stampred", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -690,7 +800,7 @@ end) RegisterNetEvent("md-drugs:client:stamporange") AddEventHandler("md-drugs:client:stamporange", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -714,7 +824,7 @@ end) RegisterNetEvent("md-drugs:client:stampblue") AddEventHandler("md-drugs:client:stampblue", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -738,7 +848,7 @@ end) RegisterNetEvent("md-drugs:client:getsinglepress") AddEventHandler("md-drugs:client:getsinglepress", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, { disableMovement = false, disableCarMovement = false, @@ -753,7 +863,7 @@ TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) end) RegisterNetEvent("md-drugs:client:exchangepresses") AddEventHandler("md-drugs:client:exchangepresses", function() -TriggerEvent('animations:client:EmoteCommandStart', {'uncuff'}) +exports["rpemotes"]:EmoteCommandStart("uncuff", 0) QBCore.Functions.Progressbar("drink_something", "Buying Press", 4000, false, true, { disableMovement = false, disableCarMovement = false,