engineGetModelNameFromID | Multi Theft Auto: Wiki Skip to content

engineGetModelNameFromID

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function gets the model name of an object model from model ID. This function is the counterpart of engineGetModelIDFromName.

Syntax

engineGetModelNameFromID ( )

Code Examples

client

This example gets the model name of an element you target (doesn't work for San Andreas world)

function getTargetModelName(target)
if ( isElement(target) and getElementType(target) == "object" ) then
outputChatBox(tostring(engineGetModelNameFromID(getElementModel(target))))
end
end
addEventHandler("onClientPlayerTarget", localPlayer, getTargetModelName)

See Also

Engine Functions
Engine Elements