EngineStreamingSetModelCacheLimits: Difference between revisions
Jump to navigation
Jump to search
(Created page with "To do") |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Client function}} | |||
This function sets custom cache limits for vehicle and pedestrian models based on provided values. The arguments that receive zero mean complete deactivation. | |||
==Syntax== | |||
<syntaxhighlight lang="lua"> | |||
bool engineStreamingSetModelCacheLimits( [ int numVehicles, int numPeds ] ) | |||
</syntaxhighlight> | |||
===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 and returns ''false''. | |||
==Example== | |||
<section name="Client" class="client" show="true"> | |||
This example turns off cache limiting. | |||
<syntaxhighlight lang="lua"> | |||
addEventHandler("onClientResourceStart", resourceRoot, | |||
function() | |||
engineStreamingSetModelCacheLimits(0, 0) | |||
end | |||
) | |||
</syntaxhighlight> | |||
</section> | |||
<section name="Client" class="client" show="true"> | |||
This example sets a limit of 128 for the cache. | |||
<syntaxhighlight lang="lua"> | |||
addEventHandler("onClientResourceStart", resourceRoot, | |||
function() | |||
engineStreamingSetModelCacheLimits(128, 128) | |||
end | |||
) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | |||
{{Engine_functions}} |
Latest revision as of 17:34, 7 November 2024
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 and returns false.
Example
Click to collapse [-]
ClientThis example turns off cache limiting.
addEventHandler("onClientResourceStart", resourceRoot, function() engineStreamingSetModelCacheLimits(0, 0) end )
Click to collapse [-]
ClientThis example sets a limit of 128 for the cache.
addEventHandler("onClientResourceStart", resourceRoot, function() engineStreamingSetModelCacheLimits(128, 128) end )
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory