engineStreamingSetMemorySize
Pair: engineStreamingGetMemorySize
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
Sets the maximum amount of RAM [in bytes] that can be used for streaming
The showmemstat command can be used to see this value in real-time [You might have to scroll down using PgDown on your keyboard]
To restore to default value use engineStreamingRestoreMemorySize
This function is meant for advanced users only, as it can lead to stability issues . Using a very high value might result in more crashes, while using a value too low might lead to frequent pop-in [and due to the way MTA works micro-stutter as well]
Syntax
engineStreamingSetMemorySize ( )Code Examples
This example adds a command that can be used to change the streaming memory size, and display the previous value.
addCommandHandler("ssms", function(_, sizeMB) if tonumber(sizeMB) then outputChatBox("The maximum streaming memory available has been changed from " .. math.floor(engineStreamingGetMemorySize() / 1024 / 1024) .. " MB to " .. sizeMB .. " MB") engineStreamingSetMemorySize(tonumber(sizeMB) * 1024 * 1024) -- Convert MB to Bytes else outputChatBox("Please enter a numeric value!") endend, false, false)See Also
Engine Functions
- engineAddClothingModel
- engineAddClothingTXD
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineFreeTXD
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetPoolCapacity
- engineGetPoolDefaultCapacity
- engineGetPoolUsedCapacity
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFile
- engineImageGetFiles
- engineImageGetFilesCount
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIFP
- engineLoadIMG
- engineLoadTXD
- enginePreloadWorldArea
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineRequestTXD
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetModelTXDID
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelTXDID
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetPoolCapacity
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetBufferSize
- engineStreamingGetMemorySize
- engineStreamingGetModelLoadState
- engineStreamingGetUsedMemory
- engineStreamingReleaseModel
- engineStreamingRequestModel
- engineStreamingRestoreBufferSize
- engineStreamingRestoreMemorySize
- engineStreamingSetBufferSize
- engineStreamingSetMemorySize
- engineStreamingSetModelCacheLimits