ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setElementInterior

Function

setElementInterior

Moves an element to an interior. A player in an interior only sees buildings and elements with the same number.

Syntax

bool setElementInterior(element theElement, int interior)

Arguments

theElementelement
The element.
interiorint
Interior 0-255.

Differences from MTA:SA

  • These MTA:SA arguments are not here: float x = nil, float y = nil, float z = nil

In MTA:SA

setElementInterior(element theElement, int interior, float x = nil, float y = nil, float z = nil)

Returns

true on success.

Example

addCommandHandler("komisariat", function(player)
    setElementInterior(player, 6)
    setElementPosition(player, 246.4, 65.8, 1003.6)
end)

Notes

Also works in client scripts. On the client it moves every element: markers, objects, vehicles, peds, pickups, colshapes, sounds and your own character (then the game area changes too).

See also