Skip to content

onPlayerTeleport triggers when standing on a destroyed element #4296

@wassmas

Description

@wassmas

Describe the bug

The onPlayerTeleport event is triggered incorrectly when a player is standing on an object or element that gets destroyed with destroyElement.

Steps to reproduce

addEventHandler("onPlayerTeleport", root, 
function(x, y, z, x2, y2, z2)
    outputChatBox("Teleported from ["..string.format("%.2f, %.2f, %.2f", x, y, z).."] to ["..string.format("%.2f, %.2f, %.2f", x2, y2, z2).."]", root)
end)

Message: Teleported from [-0.22, -0.52, 2.37] to [117.40, 1878.21, 20.80]

Version

MTA:SA Server v1.6-release-23251

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions