Skip to content

Commit f556ecd

Browse files
Code cleanup
1 parent ed1ae9f commit f556ecd

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

client/coke.lua

-53
Original file line numberDiff line numberDiff line change
@@ -330,59 +330,6 @@ AddEventHandler('ps-drugprocessing:pickCocaLeaves', function()
330330

331331
end)
332332

333-
<<<<<<< Updated upstream
334-
=======
335-
--[[Citizen.CreateThread(function()
336-
while true do
337-
Citizen.Wait(0)
338-
local playerPed = PlayerPedId()
339-
local coords = GetEntityCoords(playerPed)
340-
local nearbyObject, nearbyID
341-
342-
for i=1, #CocaPlants, 1 do
343-
if GetDistanceBetweenCoords(coords, GetEntityCoords(CocaPlants[i]), false) < 1 then
344-
nearbyObject, nearbyID = CocaPlants[i], i
345-
end
346-
end
347-
348-
if nearbyObject and IsPedOnFoot(playerPed) then
349-
350-
if not isPickingUp then
351-
QBCore.Functions.Draw2DText(0.5, 0.88, 'Press [~g~ E ~w~] to pick cocaine leaves', 0.5)
352-
end
353-
354-
if IsControlJustReleased(0, 38) and not isPickingUp then
355-
isPickingUp = true
356-
TaskStartScenarioInPlace(playerPed, 'world_human_gardener_plant', 0, false)
357-
358-
QBCore.Functions.Progressbar("search_register", "Picking cocaine leaves..", 10000, false, true, {
359-
disableMovement = true,
360-
disableCarMovement = true,
361-
disableMouse = false,
362-
disableCombat = true,
363-
}, {}, {}, {}, function() -- Done
364-
ClearPedTasks(PlayerPedId())
365-
SetEntityAsMissionEntity(nearbyObject, false, true)
366-
DeleteObject(nearbyObject)
367-
368-
table.remove(CocaPlants, nearbyID)
369-
spawnedCocaLeaf = spawnedCocaLeaf - 1
370-
371-
TriggerServerEvent('ps-drugprocessing:pickedUpCocaLeaf')
372-
373-
end, function()
374-
ClearPedTasks(PlayerPedId())
375-
end)
376-
377-
isPickingUp = false
378-
end
379-
else
380-
Citizen.Wait(500)
381-
end
382-
end
383-
end)]]--
384-
385-
>>>>>>> Stashed changes
386333
AddEventHandler('onResourceStop', function(resource)
387334
if resource == GetCurrentResourceName() then
388335
for k, v in pairs(CocaPlants) do

0 commit comments

Comments
 (0)