Skip to content

Fix event handler target root, nil element destruction, and type conversions in interiors - #745

Open
iManGaaX wants to merge 2 commits into
multitheftauto:masterfrom
iManGaaX:patch-7
Open

Fix event handler target root, nil element destruction, and type conversions in interiors#745
iManGaaX wants to merge 2 commits into
multitheftauto:masterfrom
iManGaaX:patch-7

Conversation

@iManGaaX

@iManGaaX iManGaaX commented Sep 2, 2026

Copy link
Copy Markdown
  • Updated doWarpPlayerToInterior event handler in interiors_client.lua to target root instead of localPlayer so server triggers execute properly.
  • Added isElement checks before destroying markers and colshapes during resource cleanup to avoid runtime errors on one-way or missing markers.
  • Safe-cast coordinates, dimensions, and rotation parameters with tonumber to prevent arithmetic type mismatch errors when calculating player rotation.
  • Implemented isElement(player) validation inside asynchronous timer callbacks (setPlayerInsideInterior) to prevent server warnings if a player quits mid-warp.

Refactored interior handling by reintroducing marker animations and improving resource management. Added checks for element existence before destroying markers.
Refactor interior management functions to improve marker creation and resource handling.
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.

1 participant