GetPlayerNetworkStats: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetPlayerNetworkStats(player)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncReturnV..." |
FlyingFork (talk | contribs) No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Gets the clients' NetworkStats}} | ||
{{FuncSyntax|GetPlayerNetworkStats(player)}} | {{FuncSyntax|GetPlayerNetworkStats(player)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|player| | {{FuncParam|player|The player identifier}} | ||
{{FuncReturnValue| | {{FuncReturnValue|packetlossTotal, packetlossLastSecond, messagesInResendBuffer, bytesInResendBuffer, bytesSend, bytesReceived, bytesResent, bytesSendTotal, bytesReceivedTotal, bytesResentTotal, isLimitedByCongestionControl, isLimitedByOutgoingBandwidthLimit}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
for name, value in pairs(GetPlayerNetworkStats(player)) | |||
print(name .. " -> " .. value) | |||
do | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[GetPlayerNetworkStats]] | |||
* [[GetNetworkStats]] |
Latest revision as of 14:53, 26 June 2021
Description
Gets the clients' NetworkStats
Syntax
GetPlayerNetworkStats(player)
Parameters
- player
The player identifier
Return Value
- packetlossTotal, packetlossLastSecond, messagesInResendBuffer, bytesInResendBuffer, bytesSend, bytesReceived, bytesResent, bytesSendTotal, bytesReceivedTotal, bytesResentTotal, isLimitedByCongestionControl, isLimitedByOutgoingBandwidthLimit
Example
for name, value in pairs(GetPlayerNetworkStats(player))
print(name .. " -> " .. value)
do