engineStreamingGetBufferSize | Multi Theft Auto: Wiki Skip to content

engineStreamingGetBufferSize

Client-side
Server-side
Shared

Pair: engineStreamingSetBufferSize

Added in 1.6.0 r21874

Get the streaming buffer size [not maximum memory size].

OOP Syntax Help! I don't understand this!

Syntax

int engineStreamingGetBufferSize ( )

Returns

  • int: buffer size

The streaming buffer size. It is always a positive non-zero number.

Code Examples

client

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

addCommandHandler("sbs", function(_, sizeMB)
if tonumber(sizeMB) then
if engineStreamingSetBufferSize(tonumber(sizeMB) * 1024 * 1024) then -- Convert MB to Bytes
outputChatBox("The streaming buffer size has been changed from " .. math.floor(engineStreamingGetBufferSize() / 1024 / 1024) .. " MB to " .. sizeMB .. " MB")
else
outputChatBox("Not enough memory!")
end
else
outputChatBox("Please enter a numeric value!")
end
end, false, false)

See Also

Engine Functions