onElementInteriorChange
Client-side
Server-side
Shared
This event is triggered when the interior of an element is changed using setElementInterior.
This is a test!
Parameters
int oldInterior, int newInterior
- oldInterior: An int representing the interior the element was in before.
- newInterior: An int representing the interior the element is in now.
Source
element: The source of this event is the element that changed its interior.
Handler Example
local function handleOnElementInteriorChange(oldInterior, newInterior) -- Your code hereend
-- Register the event handleraddEventHandler("onElementInteriorChange", elementAttachedTo, handleOnElementInteriorChange)
Code Examples
Demonstrates how to detect and respond to an element's interior change. Includes vehicle creation and an event handler that reports the interior transition.
local vehicle = createVehicle(411, 0, 0, 3)setTimer(setElementInterior, 1000, 1, vehicle, 10)
addEventHandler("onElementInteriorChange", vehicle, function(oldInterior, newInterior) outputChatBox(inspect(source).."'s interior changed from "..oldInterior.." to "..newInterior)end)