M MY Multiplayer: Wiki
Side
Kind

setElementStreamable

Client

Chooses whether an element streams in and out with distance or always stays loaded.

bool setElementStreamable(element element, bool streamable)

Parameters

NameTypeDescription
elementelementThe element.
streamablebooltrue to follow the distance (the default), false to always stay streamed in.

Returns

true if it changed, false if the element was already like that or is not a world element.

An element that does not follow the distance stays streamed in while it is in the focused dimension.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    setElementStreamable(vehicle, false)
end

See also