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

feat(nui/resources): add DOES_DUI_EXIST #3109

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

Conversation

DaniGP17
Copy link
Contributor

Goal of this PR

I don't know how this PR can be received, but I think it's a good idea to add this native to check if a dui handle is valid, because currently there is no way to do this, and when using the IS_DUI_AVAILABLE native with a handle that has been destroyed or invalid it shows an error: SCRIPT ERROR: invalid handle.
This native would be equivalent to the DOES_ENTITY_EXIST for entities.

How is this PR achieving the goal

Checking if the DUI handle is valid by verifying its presence in g_ScrBindPool.Handles.

This PR applies to the following area(s)

FiveM, Natives

Successfully tested on

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant