10.08.2011, 06:44
You are using 2 loops that do the same thing. Use this:
You will also need:
pawn Код:
#define DIALOG_FPS_LIST (1337)
new
FPSList[512];
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
format(FPSList, sizeof(FPSList), "%s%s: %s\n", FPSList, pName(i), GetPlayerFPS(i));
}
}
ShowPlayerDialog(playerid, DIALOG_FPS_LIST, DIALOG_STYLE_MSGBOX, "Players' FPS", FPSList, "Ok", "");
pawn Код:
stock pName(playerid)
{
new
iName[MAX_PLAYER_NAME];
GetPlayerName(playerid, iName, sizeof(iName));
return iName;
}