MTA:Eir/functions/engineSetWorldStreamingEnabled

From Multi Theft Auto: Wiki
Revision as of 08:07, 28 September 2023 by Tracer (talk | contribs) (Renamed template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function enables or disables the rendering and streaming of world instances. World instances are IPL sectors, COL sectors, buildings, objects and dummies. This function does not affect world instances created by MTA.

Syntax

bool engineSetWorldStreamingEnabled ( bool enabled )

Returns

Returns true if enabled is passed as valid bool, false otherwise.

Example

Click to collapse [-]
Client

This snippet clears the entire GTA:SA world of native entities and increases engine performance.

addEvent( "onClientGameEnterTCMode", true );
addEventHandler( "onClientGameEnterTCMode", root,
    function()
        engineSetWorldStreamingEnabled( false );
    end
);