- Documentation
- Client functions
- engineLoadDFF
Function
engineLoadDFF
Loads a model from a resource .dff file (like engineLoadMesh). It takes textures from a .txd assigned earlier with engineImportTXD for that number or from a .txd with the same name. A path other than a .dff file means an engine asset.
Syntax
mesh engineLoadDFF(string dffFile [, int modelID])Arguments
dffFilestring- The
.dfffile. modelIDint, optional- Model number (for textures).Not in MTA:SA
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
engineLoadDFF(string filePath/rawData)Returns
The model or false.
Example
local txd = engineLoadTXD("modele/auto.txd")
engineImportTXD(txd, 411)
local dff = engineLoadDFF("modele/auto.dff", 411)
engineReplaceModel(dff, 411)
See also
engineLoadTXDLoads a resource.txdfile with textures forengineImportTXDandengineLoadDFF. Another path means a texture as an engine asset.engineReplaceModelReplaces the look of a model number: with an engine asset (engineLoadAsset) or a model from a file (engineLoadMesh). Objects, vehicles and peds (skins 0-312; a file model without a skeleton is static) with that number show the new model. An object without its own collision gets one from the.dffor from the model triangles;engineReplaceCOLgives a custom collision. It works for this player, so call it in a client script. Replacing a newengineRequestModelmodel that the game has not created yet (the player is just joining, a resource restart) waits for it; a model number that does not exist givesfalse.engineLoadMeshLoads a 3D model from a resource file:.obj,.stl,.ply,.gltf,.glb,.fbx,.3dsand.dfffrom GTA SA (textures from a.txdnext to it). Place the model withcreateMeshObjector put it under a number withengineReplaceModel.