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

Fixed iterating over online players for qb-core #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LordChunk
Copy link

@LordChunk LordChunk commented Mar 19, 2023

npwd_services currently doesn't iterate over online players correctly when using qb-core. This PR correctly iterates over all online players by using for _, Player in pairs(players) do instead of for i = 1, #players do.

The problem can be reproduced on your own by joining, leaving and then joining a server while doing this, you should have a job which is listed in the app and be on duty. The first time you join, you will be listed in the app, but the second time you will not be listed.

@LordChunk
Copy link
Author

@project-error could someone be assigned to review these changes?

@BackSH00TER
Copy link

✅Tested this on my end and confirmed it does fix the issue.

Without this fix the Players are incorrectly being iterated over which results in no results rendering.

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

Successfully merging this pull request may close these issues.

2 participants