Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no mining option on rocks. #41

Open
FrequencyRoleplay opened this issue Feb 8, 2023 · 3 comments
Open

no mining option on rocks. #41

FrequencyRoleplay opened this issue Feb 8, 2023 · 3 comments

Comments

@FrequencyRoleplay
Copy link

I even tried updating qb target.... I can target ped shop no problem but the ore/rocks dont show any option to mine like they used to.

been like this for over a month now. SOS

@FrequencyRoleplay
Copy link
Author

going to an older qb-target fixed this for me.

@Schlingelberger
Copy link

@SlugTeamSix
Copy link

SlugTeamSix commented Apr 14, 2023

Editing this post and removing all my debugging guesses for clarity.

This issue is caused by having updating qb-target from the version which uses function ItemCount to check if data.item is true, to the version which uses function ItemCheck. The newer qb-target version does ItemCheck = QBCore.Functions.HasItem instead of the old code where it actually grabbed your playerdata.items inside of qb-target.

This is where the problem begins, presumably if you are updating from an older qb-target you have an older qb-core. On an old core HasItem only supports one item at a time and doesn't play nice with multiple item checks.

This situation can be fixed and still allow you to use an updated qb-target by updating your qb-core HasItem function (specifically the one on the client side is needed for this script). However be aware, the new HasItem function in qbcore just triggers an export in qb-inventory, so if your inventory is old as well you'll need to update by adding in the HasItem function and export, then adding the event to the core.

And then it all works as intended!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants