MTA:Eir/functions/engineStreamingIsFiberedLoadingEnabled

From Multi Theft Auto: Wiki

This function returns whether the GTA:SA Streaming system is in original or fibered mode. In original mode, most resources are loaded in one go, but big ones (exceeding slicer buffer size) are loaded exclusively and in two pulses. In fibered mode, the Streaming system can only take a user-defined percentage of the game frame time, meaning that resources can take an arbitrary amount of pulses depending on the complexity of said resources.

By default, fibered loading is enabled.

Syntax

bool engineStreamingIsFiberedLoadingEnabled ()

Returns

Returns true if fibered loading is enabled, false otherwise.

Example

Click to collapse [-]
Client

This snippet draws on the screen whether fibered loading is enabled or not.

addEventHandler( "onClientRender", root,
    function()
        local isEnabled = engineStreamingIsFiberedLoadingEnabled();

        dxDrawText( "Streaming Mode: " .. ( isEnabled and "fibered loading" or "single execution" ), 100, 400 );
    end
);