Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:netstats(playerid, params[])
- {
- new
- nStatsStr[420];
- if(isnull(params))
- {
- GetNetworkStats(nStatsStr, sizeof(nStatsStr));
- SendClientMessage(playerid, COLOR_KHAKI, "You are now viewing the server's network statistics");
- ShowPlayerDialog(playerid, DIALOG_P_NETSTATS, DIALOG_STYLE_MSGBOX, ""#CRED"[U] Army: "#CWHITE"Server Network Statistics", nStatsStr, "Ok", "Close");
- }
- else
- {
- new
- iStr[60],
- pID = strval(params);
- if(!IsPlayerConnected(pID))
- return SendClientMessage(playerid, COLOR_RED, "You've entered an invalid user id!");
- GetPlayerNetworkStats(pID, nStatsStr, sizeof(nStatsStr));
- ShowPlayerDialog(playerid, DIALOG_P_NETSTATS, DIALOG_STYLE_MSGBOX, ""#CRED"[U] Army: "#CWHITE"Player Network Statistics", nStatsStr, "Ok", "Close");
- format(iStr, sizeof(iStr), "You are now viewing %s's network statistics", gName[pID]);
- SendClientMessage(playerid, COLOR_KHAKI, iStr);
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment