Zum Hauptinhalt springen

GetPlayerNetworkStats

Description

Gets a player's network stats and saves them into a string.

NameDescription
playeridThe ID of the player you want to get the networkstats of.
output[]The string to store the networkstats in, passed by reference.
size = sizeof (output)The length of the string that should be stored.

Returns

This function always returns 1.

Examples

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/mynetstats"))
{
new stats[400+1];
GetPlayerNetworkStats(playerid, stats, sizeof(stats));
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "My Network Stats", stats, "Okay", "");
}
return 1;
}

Notes

tipp

This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out.