MTA:Eir/functions/engineGetActiveStreamingEntityCount

From Multi Theft Auto: Wiki
Revision as of 18:14, 10 December 2013 by The GTA (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This function returns how many entities are inside of the streaming garbage collection system. It is usefu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns how many entities are inside of the streaming garbage collection system. It is useful for performance debugging purposes. More uses come out of it if combined with other engine streaming functions.

Syntax

int engineGetActiveStreamingEntityCount ()

Returns

Returns the amount of entities that are registered inside of the streaming garbage collector.

Example

Click to collapse [-]
Client

This snippet draws the amount of active streaming entities on your screen.

addEventHandler( "onClientRender", root,
    function()
        local count = engineGetActiveStreamingEntityCount();

        dxDrawText( "#streaming-entities: " .. count, 100, 400 );
    end
);