getNetworkUsageData | Multi Theft Auto: Wiki Skip to content

getNetworkUsageData

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

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


This function returns a table containing network usage information about inbound and outbound packets.

Syntax

getNetworkUsageData ( )

Code Examples

server

This example adds commandndthat shows info about all inbound packets with bits bigger than zero.

addCommandHandler("nd",
function ()
local networkData = getNetworkUsageData()["in"]
for i, val in pairs(networkData["count"]) do
if networkData["bits"][i] > 0 then
outputChatBox("ID: " .. i .. ": " .. val .. " - " .. networkData["bits"][i] .. "b")
end
end
end)