Fields & Labs [ESX][Free]

this is an amazing script, put together for user ease. Thanks for this release to the Community.

2 Likes

we gwt a little misstacke in the labs, but we don´t know why

Make sure you are using at least ESX v1.1 or higher.

we have 1.1.0

Did you set UseLegacy to false in Config?

yes, fields working fine, but in the labs we get the fail.

i will make script work with old esx maybe tomorrow :thinking:

already on it :smiley:
processing is unlimited at the moment only need to figure this out then it works :smiley:

will continue it tomorrow i think need to sleep :smiley:

just need one function nothing else

RegisterServerEvent('lab-fields:process')
AddEventHandler('lab-fields:process', function(neededItem, neededAmount, neededLabel, givenItem, givenAmount, givenLabel, neededCops)
    local xPlayer = ESX.GetPlayerFromId(source)
    if CopsConnected >= neededCops then
        xPlayer.removeInventoryItem(neededItem, neededAmount)
        xPlayer.addInventoryItem(givenItem, givenAmount)
        xPlayer.showNotification('You processed: x' .. neededAmount .. ' ' .. neededLabel .. ' Into: x' .. givenAmount .. ' ' .. givenLabel ..'.')
        Log(':pill:  ' .. xPlayer.getName() ..  ' - ' .. xPlayer.getIdentifier(), '```Processed: x' .. neededAmount .. ' ' .. neededLabel .. ' Into: x' .. givenAmount .. ' ' .. givenLabel ..'.```')
    else
        xPlayer.showNotification('You can not do this action!')
    end
end)

well currently i have it like this BUT the else wont register or iam to tired to realise :smiley:

at first check github that part completely changed and it secend will see how should support old versions :smiley:

1 Like

oh we had the version from yesterday :smiley:

1 Like
  • Done now server side support limit base too

Tested works Fine. needed to remove the stuff with IsThereEnoughJob since that wasnt working for us but now it works

Any error with getting enogh job on old esx?

I got this problem,

[script:lab-Fields-ma] SCRIPT ERROR: @lab-Fields-main/server/main.lua:45: attempt to compare nil with number

any error enough cops

with another job works but not with police i didnt understand it

its doesnt work for me i use 1.1 and when i go to harvest just when i press e the 3d text is disappearing

will fix when this commit get merge

Bazi’s commit is merged, make sure to update the resource if you want to use it for old ESX.
But seriously… Update your ESX… :face_with_monocle:

1 Like

i got legacy… and i can confirm the swapitem don’t work :slight_smile: