GetPlayerNetworkStats

GetPlayerNetworkStats

Description:
Function GetPlayerNetworkStats gets a player's network stats and saves them into a string.
Function GetPlayerNetworkStats was added in 0.3c R4 and will not work in earlier versions!
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.


Parameters:
(playerid, retstr[], retstr_size)
int playerid The ID of the player you want to get the networkstats of.
string retstr The string to store the networkstats in, passed by reference.
int retstr_size The length of the string that should be stored.


Return Values:
This function always returns 1.


Examples:
public OnPlayerCommandText(playerid,cmdtext[])
{    
    if(!strcmp(cmdtext, "/mynetstats"))
    {
        new stats[400+1];
        GetPlayerNetworkStats(playerid, stats, sizeof(stats)); // get your own networkstats
        ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "My NetworkStats", stats, "Okay", "");
    }
    return 1;
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.