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

Added c query requests for gtasao (open.mp) #547

Merged
merged 3 commits into from
Feb 22, 2024
Merged

Added c query requests for gtasao (open.mp) #547

merged 3 commits into from
Feb 22, 2024

Conversation

Focus04
Copy link
Contributor

@Focus04 Focus04 commented Feb 22, 2024

This is a follow-up to #388. User who opened the issue was right and has been backed up by various open.mp devs. D query is not yet supported by omp, which breaks regular gtasam queries on these servers, resulting in an empty players array. A workaround is using C queries instead, similarly to how vcm is handled, which returns a less detailed, but handy array of players along with their scores.
This adds a separate protocol for the already existing gtasao query type, which extends base samp. This new protocol sends a C packet instead of D and will consequently return a populated array of players, as expected.
Below are 2 queries for a server running open.mp with these changes added. More of a before and afer since both queries previously returned empty players arrays.

  • gtasam (D query - empty player list)

image (2)

  • gtasao (C query - populated player list)

image (1)

Copy link
Member

@CosminPerRam CosminPerRam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please also add a line in the changelog file.

super()
this.isOmp = true
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a trailing newline here (:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and done.

@CosminPerRam CosminPerRam merged commit 6bfc342 into gamedig:master Feb 22, 2024
4 of 5 checks passed
@podrivo podrivo mentioned this pull request Feb 24, 2024
57 tasks
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