M MY Multiplayer: Wiki
Side
Kind

isElementStreamedIn

Client

Tells whether an element is loaded into this client's world.

bool isElementStreamedIn(element element)

Parameters

NameTypeDescription
elementelementA player, ped, vehicle, object, effect or light.

Returns

true if the element is streamed in, false if not.

The local player is always streamed in.

Example

for _, ped in ipairs(getElementsByType("ped")) do
    if isElementStreamedIn(ped) then
        outputDebugString("ped near: " .. tostring(ped))
    end
end
NoteAny other element type raises an error.

See also