GetNetworkStats

From SA-MP Wiki

Jump to: navigation, search


GetNetworkStats was added in SA-MP 0.3x This function was added in SA-MP 0.3c R4 and will not work in earlier versions!


Gets the server's network stats and stores them in a string.


Parameters:
(retstr[], retstr_size)
retstr[]The string to store the network stats in, passed by reference.
retstr_sizeThe length of the string to be stored.


public OnPlayerCommandText(playerid,cmdtext[])
{    
    if(!strcmp(cmdtext, "/netstats"))
    {
        new stats[400+1];
        GetNetworkStats(stats, sizeof(stats)); // get the servers networkstats
        ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Server Network Stats", stats, "Close", "");
    }
    return 1;
}

Related Functions

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

Personal tools