MTA:Eir/functions/engineStreamingIsElementManaged
From Multi Theft Auto: Wiki
This function returns whether the given element is managed by the Streaming garbage collector. If an entity is managed, its RenderWare data can be deallocated once the engine is lacking available streaming memory (an option found in your game settings under the Video tab).
Syntax
bool engineStreamingIsElementManaged ( element entity )
Arguments
- entity: an entity that is streamed in and has a visible game representation
Returns
Returns true if the given entity is being managed by the engine Streaming GC system. Returns false if the entity type is not being managed at all, entity does not have a visible game representation or entity is not passed as valid parameter.
Example
Click to collapse [-]
ClientThis snippet returns every object that is managed by the Streaming GC system.
function getStreamingManagedObjects() local objects = getElementsByType( "object" ); local managedObjects = {}; local num = 1; for m,n in ipairs( objects ) do if ( engineStreamingIsElementManaged( n ) ) then managedObjects[num] = n; num = num + 1; end end return managedObjects, num; end