- Documentation
- Client functions
- createMeshObject
Function
createMeshObject
Places a model from engineLoadMesh in the world, only for this player: position, rotation and scale. Control the object with the setMeshObject* functions.
Syntax
meshobject createMeshObject(mesh mesh, float x, y, z [, float rx, ry, rz = 0, float scale = 1])Arguments
meshmesh- The model.
x, y, zfloat- Position.
rx, ry, rzfloat, optional = 0- Rotation.
scalefloat, optional = 1- Scale.
Returns
The object or false.
Example
local mesh = engineLoadMesh("modele/pomnik.glb")
local statue = mesh and createMeshObject(mesh, 2495, -1680, 13.5, 0, 0, 90, 1.5)
See also
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.destroyMeshObjectRemoves a model object from the world.setMeshObjectPositionMoves a model object (metres).isMeshObjectChecks whether a value is an existing object fromcreateMeshObject.