Jump to content

cheaters canceling onClientPlayerDamage


Recommended Posts

Hello,

I'm developing an anti-cheat system in MTA:SA and I'm trying to detect players who block or cancel the `onClientPlayerDamage` event on their side, which prevents the server from detecting damage via `onPlayerDamage`.

I know that if the client cancels `onClientPlayerDamage` using `cancelEvent()`, the server-side `onPlayerDamage` event will not be triggered. Resulting in godmode and players not dying

So my question is:
- Is there a reliable way to detect if the client-side damage event was cancelled?
- Does MTA have an anti cheat against this type of cheating ?
-Are there other ways for cheating to cancel damage taken and not die?

Any suggestions or ideas to detect and prevent this kind of abuse would be appreciated!

Thanks in advance.

Link to comment
  • 2 weeks later...
  • Moderators
On 22/06/2025 at 12:58, MineX server said:

- Is there a reliable way to detect if the client-side damage event was cancelled?

You might be able to detect it using:
https://wiki.multitheftauto.com/wiki/WasEventCancelled

Though I do not know if this functions works correctly for native events. Something you have to test yourself. Make sure to set the addEventHandler to low priority.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...