RegisterNetEvent('ps-drugprocessing:ProcessCocaFarm')
AddEventHandler('ps-drugprocessing:ProcessCocaFarm', function()
local coords = GetEntityCoords(PlayerPedId(source))
if GetDistanceBetweenCoords(coords, Config.CircleZones.CokeProcessing.coords, true) < 5 then
if not isProcessing then
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
if result then
print('You have this item SA')
hasitem1 = true
else
QBCore.Functions.Notify('You need Coca Leafs!...', 'error')
end
end, 'coca_leaf')
Citizen.Wait(1000) -- BUFFER
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
if result and hasitem1 then
print('You have this item HA')
ProcessCoke()
else
QBCore.Functions.Notify('You need Scissors to cut with!..', 'error')
end
end, 'trimming_scissors')
end
end
RegisterNetEvent('ps-drugprocessing:ProcessCocaFarm') AddEventHandler('ps-drugprocessing:ProcessCocaFarm', function() local coords = GetEntityCoords(PlayerPedId(source))
end)