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: txAdmin Heal Everyone functionality #98

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Conversation

mafewtm
Copy link
Member

@mafewtm mafewtm commented Jul 24, 2024

Description

Fixes #94 though I feel these events might be exploitable

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

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

How does changing this from a callback to an event fix txAdmin?

server/main.lua Outdated Show resolved Hide resolved
@mafewtm
Copy link
Member Author

mafewtm commented Jul 25, 2024

How does changing this from a callback to an event fix txAdmin?

Currently the event handler, txAdmin:events:healedPlayer passes an id which is either the player id or -1 and then passes that to the revivePlayer and heal functions. Inside these functions are the ox_lib callbacks which can't take -1 as a source. This then breaks the ability to heal everyone through txAdmin which why I've now changed it to events

@Manason Manason merged commit 5a1a83a into main Aug 11, 2024
4 checks passed
@Manason Manason deleted the fix-txAdmin-heal-everyone branch August 11, 2024 00:24
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.

When player dead cant be revive by txAdmin
2 participants