onClientElementInteriorChange
ClientEvent
Fired after an element moves to another interior. It does not fire when the interior stays the same.
addEventHandler("onClientElementInteriorChange", root, function(int oldInterior, int newInterior) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| oldInterior | int | The previous interior. |
| newInterior | int | The new interior. |
Source
The element (player, ped, vehicle, object, sound or light) that changed interior.
Example
addEventHandler("onClientElementInteriorChange", localPlayer, function(oldInterior, newInterior)
if newInterior == 0 then
outputDebugString("back outside")
end
end)