onElementInteriorChange
ServerEvent
Fired after an element moves to another interior. It does not fire when the interior stays the same.
addEventHandler("onElementInteriorChange", 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 or sound) that changed interior.
Example
addEventHandler("onElementInteriorChange", root, function(oldInterior, newInterior)
if getElementType(source) == "player" and newInterior ~= 0 then
setElementDimension(source, 0)
end
end)