[ESX] [FREE] esx_s_fishing

Well sounds like you’ll need to add some sort of prevention to it so it can not be spammed. (For example, disable opening inventory while fishing etc)
also for the minigame, yeah i suppose it is possible but my time is so limited so i’d rather not

Also I made this for default esx menu inventory so i do not have any idea how to add such prevention to other inventory systems, just stating this as a disclaimer

Well I would assume it is possible to replicate for the default Esx inv and guides or anything you can point to that can help not open your inventory when u start fishing? Otherwise I am going to have to find another script and set this aside.

For the mini game how is that created where can that be edited?

Well for default there should be some kind of disablecontrolaction looped IIRC. so if the inventory opens from F2 it should already be impossible to open inv. For the minigame i integrated it in separate files, should be fairly easy to find the files.

--Drawing function, added as an extra spice inventory disabling.. Just to make sure players wont fuck anything up or exploit anything
function drawtext()
    local pedcoords = GetEntityCoords(PlayerPedId())
    while draw do
        w = 5
        DisableControlAction(0, 288, true) -- F1
        DisableControlAction(0, 289, true) -- F2
        Draw3DText(pedcoords.x - 1, pedcoords.y, pedcoords.z + 1,'Press [~r~X~s~] to stop fishing')
        if IsControlJustPressed(0, 73) then
            ESX.ShowNotification('Stopped fishing')
            DeleteEntity(rod)
            DeleteObject(rod)
            rng22 = false
            TriggerEvent('s_fishing:rng')
            cancel()
            ClearPedTasks(PlayerPedId())
            break
        end
        Citizen.Wait(w)
    end
    while not draw do
        break
    end
end

I noticed this here with the disable for f1 and f2 but that still works so something doesn’t add up here