M MY Multiplayer: Wiki
Side
Kind

setElementDimension

Shared

Changes the dimension of an element and of all its children.

bool setElementDimension(element element, int dimension)

Parameters

NameTypeDescription
elementelementThe player, ped, vehicle, object, colshape, sound, effect, light or element made with createElement.
dimensionintDimension, an integer from 0 to 65535.

Returns

true if it applied to the element itself, false if its type has no dimension. Raises an error if dimension is outside 0 to 65535.

When the dimension changes, it fires onElementDimensionChange (on the server) or onClientElementDimensionChange (on a client).

Example

addCommandHandler("private", function(player)
    setElementDimension(player, 1)
end)

See also