engineStreamingGetMemorySize | Multi Theft Auto: Wiki Skip to content

engineStreamingGetMemorySize

Client-side
Server-side
Shared

Pair: engineStreamingSetMemorySize

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Gets the maximum amount of RAM [in bytes] that can be used for streaming

Tip

The showmemstat command can be used to see this value in real-time [You might have to scroll down using PgDown on your keyboard]

Syntax

engineStreamingGetMemorySize ( )

Code Examples

client

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!")
end
end, false, false)

See Also

Engine Functions
Engine Elements