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

Not Working for me :

[quote]
if ((exports.vdk_inventory:notFull() == true) and (exports.vdk_inventory:getQuantity(JOBS[jobId].raw_id) < 32)) then [/quote]

Got error :

Error resuming coroutine: vkrec.lua :102: attempt to index a nil value (field ‘?’)
stack traceback:
vdkrec.lua:102: in function <vdkrec.lua:97>

I really need to limit the items inventory to 32 but nothing work, help ?

juste add in the database a colum like “item_id”, add it in the jobs:getJobs request (server side) and setup smthing like that :

if (job_Id == 4) then 
setBlip(item.fx, item.fy, item.fz, item.item_id)
setBlip(item.tx, item.ty, item.tz, item.item_id)
setBlip(item.sx, item.sy, item.sz, item.item_id)
end


 
1 Like

Works perfectly, thank you.

1 Like

excuse me, can you be more precise
how can i add the " item_id" in the server file ?

It’s time to another modification, its about item limitation this time ù_ù
You can modify limitation for each item (like 30 for iron and 60 for steel for example)

Here the pastebin: https://pastebin.com/0a91wkPh

2 Likes

Will it be updated in the current inventory or recolt script?

Can you release your modified script with all the modified lua in, because , i get some errors when I try to copy/paste them. I’m sure I do something wrong and with zip files just need to extract the modified files sure it will work #1. Thansk l’ami!

How can I have a message when we’re full like “Your inventory is full”.
Another question : how can I fix recolt by jobs ? I uninstall to much time for try to fix it but I cannot, I’ll appreciate if you can help me.

I’m lost with that :
add “i1.limitation AS raw_lim, i2.limitation AS treat_lim” in SQL request

can you send some screen for how to do the step 2 ?

EDIT : Nevermind it’s in server.lua too

Sir_Smog1 : I’m not the maintainer of the script, sorry ^^
DealTime : I don’t know if the maitainer of this script allow a reupload
stivicx : Just add an else clause . And give me your error if you want I help you

##Note
I found an error, I’ve just edit my pastebin, it’s about getQuantity function in vdk_inventory :slight_smile:

I changed the step 3 but it’s broke the recolt x)

Didn’t work :frowning:

else
if (near == ‘field’ and exports.vdk_inventory:getQuantity(JOBS[jobId].raw_id) > 40) then
recolt(‘Inventory full’’)

-> I don’t have an error just everyone can take the resource. I don’t know where I can fix by jobs

Hello,

I would like to add another treatment ,

Transform wood into boards and boards into furniture and sell furnitures
I think it’s something about the DB

someone can help me to do it please ?

Thanks

What do you mean ? Just use the simple system Bro.
1 = Recolt wood
2 = treatment
3 = selling

Yes this is good and working
well

My question was if it’s possible to add another treatment

recolt
treatment
treatment
selling
:slight_smile:

I already planned to modify this script to do this :wink:

Hello, I think I found a bug:

When we go to the fields, and then for example, we go to the sale (without going through the treatment) the script crashes and it is no longer possible for us to harvest again, treat or sell.

I’ve just test, and I’ve no problem :slight_smile:

With the basic script, when I harvest and I sell without going through the treatment, the script “crashes” and I can no longer go back to harvest or treat, Nothing happens.