EngineGetModelNameFromID: Difference between revisions
Jump to navigation
Jump to search
(add oop syntax) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function gets the model name of an object model from model ID. | This function gets the model name of an object model from model ID. This function is the counterpart of [[engineGetIDFromModelName]]. | ||
==Syntax== | ==Syntax== |
Revision as of 12:30, 6 July 2018
This function gets the model name of an object model from model ID. This function is the counterpart of engineGetIDFromModelName.
Syntax
string engineGetModelNameFromID ( int modelID )
OOP Syntax Help! I don't understand this!
- Method: Engine.getModelNameFromID(...)
Required Arguments
- modelID: The model ID of the object
Returns
Returns a string with the name of the object model, false otherwise.
Example
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
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory