IsElementLowLOD: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:
This function reveals if an element is low LOD.
This function reveals if an element is low LOD.


{{Note|The only valid elements types that can be LODs assigned with [[SetLowLODElement]] are [[Object]] and [[Building]].}}
{{Note|See [[SetLowLODElement]] for the list of valid element types that can be assigned with that function.}}


==Syntax==
==Syntax==

Revision as of 12:35, 4 November 2024

This function reveals if an element is low LOD.

[[{{{image}}}|link=|]] Note: See SetLowLODElement for the list of valid element types that can be assigned with that function.

Syntax

bool isElementLowLOD ( element theElement )

OOP Syntax Help! I don't understand this!

Method: element:isLowLOD(...)


Required Arguments

  • theElement: The element whose low LOD status we want to get.

Returns

Returns true if the element is low LOD, false otherwise.

Example

Click to collapse [-]
Clientside

This example will show how many low lods objects is around you.

addCommandHandler("lowlod",function ()
    local lowlods = 0
    for i, obj in ipairs(getElementsByType("object",root,true)) do
        if isElementLowLOD(obj) then
            lowlods = lowlods + 1    
        end
    end
    outputChatBox("Was found "..lowlods.." lowlod objects around you.",255,255,0)
end)
Click to expand [+]
Serverside

Requirements

This template will be deleted.

See Also