EngineStreamingSetModelCacheLimits

From Multi Theft Auto: Wiki
Revision as of 00:37, 8 June 2024 by Nico834 (talk | contribs) (Filling in page data & structure)
Jump to navigation Jump to search

Description

This function sets custom cache limits for vehicle and pedestrian models based on provided values.
The arguments that receive zero mean complete deactivation.

Syntax

bool engineStreamingSetModelCacheLimits( [ int numVehicles, int numPeds ] )

Arguments

  • numVehicles: Specifies the maximum number of vehicle models that can be cached.
  • numPeds: Specifies the maximum number of pedestrian models that can be cached.

Returns

Returns true if the event occurred, otherwise it throws an error message.

Requirements

This template will be deleted.

Example

Click to collapse [-]
Client

This example turns off cache limiting.

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        engineStreamingSetModelCacheLimits(0, 0)
    end
)
Click to collapse [-]
Client

This example sets a limit of 128 for the cache.

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        engineStreamingSetModelCacheLimits(128, 128)
    end
)

See Also