Here the process starts, but when it is time to cancel nothing happens …
Citizen.CreateThread(function()
Citizen.Trace("Created main thread")
while true do
Citizen.Wait(1)
if isRecolting then
Citizen.Wait(recoltTime) -- Wait for recoltTime (1 second)
-- Since isRecolting could have changed since we started waiting. Double check it
if isRecolting then
-- TODO: Give the player stuff?
Citizen.Trace("Giving player something!")
while isRecolting do
Citizen.Wait(10000)
TriggerServerEvent("fishing:dropmari")
end
else
ESX.ShowNotification("~g~Cancelaste!") -- This never happens
end
end
end
end)