28.01.2014, 19:53
pawn Код:
public OnPlayerFPSChange(playerid, oldfps, newfps)
{
static
str[24]
;
format(str, 24, "~r~FPS:~w~ %d", newfps);
PlayerTextDrawSetString(playerid, g_FPSTextdraw[playerid], str);
return 1;
}
Also:
pawn Код:
CMD:laggers(playerid, params[])
{
static
str[1024],
name[MAX_PLAYER_NAME]
;
foreach (new i : Player)
{
if (GetPlayerFPS(i) < 30)
{
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "%s%s (%d FPS)\n", str, name, GetPlayerFPS(i));
}
}
return ShowPlayerDialog(playerid, DIALOG_LAGGERS, DIALOG_STYLE_LIST, "List of Laggers", str, "Close", "");
}