ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. createBuilding

Function

createBuilding

ServerObjectsIdentical to MTA:SA

Creates a static building from a model - a lighter element than an object, without physics, meant for large maps.

Syntax

building createBuilding(int modelId, float x, float y, float z [, float rx = 0, float ry = 0, float rz = 0, int interior = 0])

Arguments

modelIdint
Model ID.
xfloat
X.
yfloat
Y.
zfloat
Z.
rxfloat, optional = 0
Rotation X.
ryfloat, optional = 0
Rotation Y.
rzfloat, optional = 0
Rotation Z.
interiorint, optional = 0
Interior.

Returns

A building element, or false.

Example

local building = createBuilding(4550, 1500, -1500, 13)

Notes

Limitation. The game does not draw building elements yet; use createObject for visible structures.

See also