M MY Multiplayer: Wiki
Side
Kind

createObject

Server

Creates an object every player sees.

Also exists on the client, with its own implementation: createObject

object|false createObject(string model, float x, y, z [, float rx, ry, rz = 0, 0, 0])

Parameters

NameTypeDescription
modelstringThe model's name, case-insensitive.
x, y, zfloatThe position in the world. A vec3 also works.
rx, ry, rzfloatThe rotation in degrees. A vec3 also works.default 0, 0, 0

Returns

The created object, or false if the model does not exist.

The object goes away when the resource that created it stops.

Example

local ramp = createObject("cj_ramp1", 1480.0, -1740.0, 13.5, 0, 0, 180)
setObjectScale(ramp, 2)

See also