EngineStreamingRestoreMemorySize

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

Restores the maximum amount of RAM [in bytes] that can be used for streaming to the default value

[[{{{image}}}|link=|]] Tip: The function to manipulate the memory size is engineStreamingSetMemorySize

Syntax

nil engineStreamingSetMemorySize()

OOP Syntax Help! I don't understand this!

Method: EngineStreaming:restoreMemorySize(...)


Example

This example adds a command that can be used to change the streaming memory size, and display the previous value.

addCommandHandler("rsms", function()
    local prevMB = math.floor(engineGetStreamingMemorySize() / 1024 / 1024)
    engineStreamingRestoreMemorySize()
    outputChatbox("The maximum streaming memory available has been restored to the original value of " .. math.floor(engineGetStreamingMemorySize() / 1024 / 1024) .. " MB [Was " .. prevMB .. " MB]")
end, false, false)

See Also