[Release] Harvest/Treatment/Selling Jobs System v1.1

I would like to add a step of treatment, how can I do?
Thank you

Hi ! Thanks for the nice release. I was wondering if there is a way to sell some items for dirty money instead of normal money. I tried something like this :

if ITEMS[item].type == 5 then
            TriggerEvent("player:sellItemb", tonumber(JOBS[jobId].treat_id), tonumber(JOBS[jobId].price))
        elseif ITEMS[item].type == 10 then
            TriggerEvent("player:sellItemb", tonumber(JOBS[jobId].treat_id), tonumber(JOBS[jobId].price))
        elseif ITEMS[item].type == 14 then
            TriggerEvent("player:sellItemb", tonumber(JOBS[jobId].treat_id), tonumber(JOBS[jobId].price))
        elseif ITEMS[item].type == 16 then
            TriggerEvent("player:sellItemb", tonumber(JOBS[jobId].treat_id), tonumber(JOBS[jobId].price))	
		else
        TriggerEvent("player:sellItem", tonumber(JOBS[jobId].treat_id), tonumber(JOBS[jobId].price))
		end

The player:sellItemb is the same as player:sellItem but with dirty money instead of normal money.
But it doesn’t work. Do you have any idea ?

1 Like

With the 2.0 version of jobsysteme when taking the job I no longer see the points of harvest.processing.vente! An idea?

You have to do the same modification that you did with 1.0 jobsys

I will soon release a full archive with jobs, inventory and harvest treat and sell system with exactly what you expect : A key to toggle the harvest / treatment or selling

If you know how to develop and adapt to your needs, here is a part of the code :

Citizen.CreateThread(function()
    --Citizen.Trace("Created main thread")
    while true do
        Citizen.Wait(1)
        if isRecolting or isTreating or isSelling then
            Citizen.Wait(timeForRecolt) -- Wait for recoltTime (1 second)
            -- Since isRecolting could have changed since we started waiting. Double check it
            if isRecolting then
				TriggerEvent("player:receiveItem", tonumber(JOBS[jobId].recolt_item_id), 1)
				drawTxt("~g~+1~w~".. tostring(JOBS[jobId].recolt_item_libelle),10,0,0.4,0.95,0.4,255,255,255,255)
				Citizen.Wait(1000)
            end
        end
    end
end)

-- Actions de récolte
function doRecolt()
	if IsControlJustPressed(1, 38) then -- If INPUT_PICKUP Is pressed (touche E)
		isRecolting = not isRecolting
	end
	if (isRecolting == false) then
		DisplayHelpText("Appuyez sur ~INPUT_PICKUP~ pour récolter.")
	else
		DisplayHelpText("Appuyez sur ~INPUT_PICKUP~ pour ~r~arrĂȘter~w~ de rĂ©colter.")
		drawTxt("~b~RĂ©colte~w~ en cours...",10,0,0.4,0.95,0.4,255,255,255,255)
	end
end

It will not work alone and it won’t work either with vdk inventory script nor his “recolt / treatment / sell” system.
I won’t do support to people using this part of script because I will release a full archive with this functionality.

Have fun.

Leor

3 Likes

Is there anyway to make it so i don’t have to use the job system? I have my own custom one - https://puu.sh/vZvR1/6022a1568e.png

You can try to modify the original vdk_recolt with the lines showed in my previous reply.
I don’t think it’s so difficult because my modifications are based on his script.

If there are many demands to get the “press E to 
” system, maybe I will have a look and modify the latest version of vdk’s script for you.

2 Likes

Thanks Leor for your help, it would indeed be great for everyone to have this new release vdk_recolt , like any other script we must improve this one to make them more useful.

Regards

Thank you it would be nice of you :slight_smile:

anyone know why im getting this

i cant see any blips and when i go to the coords of the job nothing is there

Have you got vdk_inventory?

ya i have everything set up seem to be missing 1 thing been searching and looking in the files forever

do i have to add into the recolt server.lua folder myself?

how do I restrict the recolt to a job I want it assigned to because right now any job like ems and police can gather weed.

1 Like

In ur data base under recolt you set what id for the items what they harvest then what it turns into

Can someone that has this working PM me please I have some questions

Hi, I would like to know how to make it sa that the job that sees the points and not all the world

1 Like

Hello please help me

Hi i would like to have a little help x)
Everything works perfectly and a thank you by the way, but except 1 trick, when I deco reco as a “Miner”. At my reco I am still with the minor job but points 1, 2, 3 disappeared from my map. I have to go to pole uses change job and minor ironing so that the blips re appear. Knowing that even if I go on the point and the blips are not there, I can not pick up the item.

Any idea? An error in the update of the job.

1 Like

Im not sure what causes this issue but its either VDK_Recolt or VDK_Inventory (more then likely recolt.

So right now ive had to disable them due to it causing players to instance into there own server kind of thing, We dont see them in game or in the player list but there able to use the same chat.

Ive tried this on 2 servers one overpowered and one not so powerful and same issue occurs, Ive also tried the sample.sql and doing it all myself and still get the weird instancing.

Anyone know the issue?