Available only in MTA SA 1.2 and onwards This event is triggered when an element (ped, object or vehicle) has their model changed.
int oldModel, int newModel
- oldModel: The model that the element had before the change
- newModel: The model that the element has changed to
The source of this event is the element that changed its model
This event doesn't support cancellation.
This example sends a message to players when their model changes telling them what the model ID is and was.
function informPlayerOnModelChange(oldModel, newModel) if ( getElementType(source) == "player" ) then -- Make sure the element is a player outputChatBox("Model ID changing from: "..oldModel.." to: "..newModel, source, 0, 255, 0) -- Message for player end end addEventHandler("onElementModelChange", root, informPlayerOnModelChange) -- Bind the event to every element