ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. engineLoadMesh

Function

engineLoadMesh

ClientGame engineTrilogy Hub only

Loads a 3D model from a resource file: .obj, .stl, .ply, .gltf, .glb, .fbx, .3ds and .dff from GTA SA (textures from a .txd next to it). Place the model with createMeshObject or put it under a number with engineReplaceModel.

Syntax

mesh engineLoadMesh(string filePath [, string format])

Arguments

filePathstring
The model file.
formatstring, optional
The format when the extension does not tell it.

Returns

The model or false.

Example

local mesh = engineLoadMesh("modele/pomnik.glb")
if mesh then createMeshObject(mesh, 2495, -1680, 13.5) end

Notes

Straight from Blender. Models straight from Blender and other programs (glTF, FBX, OBJ), without converting to DFF.

See also