GetPlayerNetworkStats
From SA-MP Wiki
(Difference between revisions)
Revision as of 08:02, 28 January 2014 Smithy (Talk | contribs) (Added to NetStats_Functions category) ← Previous diff |
Revision as of 01:31, 3 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 32: | Line 32: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
[[Category:NetStats_Functions]] | [[Category:NetStats_Functions]] | ||
+ | |||
+ | [[fr:GetPlayerNetworkStats]] |
Revision as of 01:31, 3 February 2014
Description:
Gets a player's network stats and saves them into a string.
(playerid, retstr[], retstr_size)
playerid | The ID of the player you want to get the networkstats of. |
retstr[] | The string to store the networkstats in, passed by reference. |
retstr_size | The length of the string that should be stored. |
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.
- GetNetworkStats: Gets the servers networkstats and saves it into a string.