Project-Sloth / ps-drugprocessing

An advanced drug script by Project Sloth
https://discord.gg/projectsloth
GNU General Public License v3.0
103 stars 87 forks source link

Cannot process any drug #102

Closed xhackax47 closed 2 years ago

xhackax47 commented 2 years ago

Hello, i have some problems with the new update.

the variables "result.ret" and "result.item" are boolean or nil and cannot be processed by the RegisterNetEvent (error on result.ret and if i remove it on result.item), says the same for all other drugs with the news variables.

RegisterNetEvent('ps-drugprocessing:ProcessCocaFarm', function()
    local coords = GetEntityCoords(PlayerPedId())

    if #(coords-Config.CircleZones.CokeProcessing.coords) < 5 then
        if not isProcessing then
            QBCore.Functions.TriggerCallback('ps-drugprocessing:validate_items', function(result)
                if result.ret then
                    ProcessCoke()
                else
                    QBCore.Functions.Notify(Lang:t("error.no_item", {item = result.item}))
                end
            end, {coca_leaf = Config.CokeProcessing.CokeLeaf, trimming_scissors = 1})
        end
    end
end)
xhackax47 commented 2 years ago

image Exemple for Coke PNJ EnterLab with result.ret again.

xhackax47 commented 2 years ago

image Line 282 here

xhackax47 commented 2 years ago

Fixed by revert all the modifications from this commit