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

fix(es_extended/client/functions.lua) RegisterInput and HashString bug #1411

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

feelfreetofee
Copy link
Contributor

In the last update, RegisterInput tries to execute the command on key release due some checks removal in #1303. The check was restored and tested.

HashString breaks when the joaat returns a hash bigger than 2^31. It was fix using a shift mask.

In the last update, **RegisterInput** tries to execute the command on key release due some checks removal in esx-framework#1303 . The check was restored and tested.

**HashString** breaks when the joaat returns a hash bigger than 2^31. It was fix using a [shift mask](https://stackoverflow.com/a/20294714).
end
RegisterKeyMapping("+" .. command_name, label or '', input_group or 'keyboard', key or '')
RegisterKeyMapping(command_name, label or '', input_group or 'keyboard', key or '')
Copy link
Contributor

Choose a reason for hiding this comment

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

Why removed '+' if you used 143 row?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made some testing, and apparently the plus sign is not required for RegisterKeyMapping. Tested in both cases where on_release is present and not.
Identical case for HashString inside of RegisterInput.
The only case where FiveM tries to trigger on_release is when the command name in RegisterCommand starts with a plus sign (+).
When on_release is not present, the command name in RegisterCommand doesn't use the symbol to prevent the following bug
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for test, and research, i merged.

@Gellipapa Gellipapa merged commit 1443d62 into esx-framework:dev Oct 13, 2024
2 checks passed
feelfreetofee added a commit to feelfreetofee/esx_core that referenced this pull request Oct 15, 2024
@Tgrp
Copy link

Tgrp commented Oct 15, 2024

Thank you very much, I had this problem too

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

Successfully merging this pull request may close these issues.

3 participants