Skip to content

Conversation

@stoneage-mta
Copy link
Contributor

@stoneage-mta stoneage-mta commented Aug 25, 2021

This PR replaces setElementHealth(localPlayer, 0) to killPed in the suicide function.

The reason it is necessary is that currently the onPlayerWasted event is receiving incorrect parameters after setElementHealth, and it has broken the detection on killmessages because the weapon parameter is being sent as id 63, which actually should only be sent if the player dies in an explosion. That is issue #2312.

So, after the killmessages rewrite (2e356cb) it was adapted to detect kills from vehicle explosions, and we ended up having to ignore the explosion deaths within the onPlayerWasted event because they are being computed client-side, and as the weapon parameter is being confused, this ended up also disabling suicide messages.

@stoneage-mta
Copy link
Contributor Author

cc @Dutchman101

@jlillis jlillis merged commit c331e2e into multitheftauto:master Aug 26, 2021
@stoneage-mta stoneage-mta deleted the freeroam-suicide branch October 25, 2021 14:28
@patrikjuvonen patrikjuvonen added this to the 1.5.9 milestone Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants