12.03.2018, 21:10
The command seems to work out good in some way, but it takes a while to generate the player's FPS and it shows few random numbers along the way, Not sure if it suppose to work like that..
e.g
I do /fpslimit 51 (which will generate it to 56-57)
I do /fps 0 (my id)
It shows this:
first time use of the command
117,
second time
118
third
102
4th 56
It shows my fps not correctly only after a few times of performing the command (I guess I have to wait till it generates it perfectly.)
e.g
I do /fpslimit 51 (which will generate it to 56-57)
I do /fps 0 (my id)
It shows this:
first time use of the command
117,
second time
118
third
102
4th 56
It shows my fps not correctly only after a few times of performing the command (I guess I have to wait till it generates it perfectly.)
PHP код:
CMD:fps(playerid, params[])
{
new
fps,
target,
str[64],
PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
fps = GetPlayerDrunkLevel(target);
if(fps < 100) {
SetPlayerDrunkLevel(target, 2000);
} else {
if (gDrunkLevelLast[target] != fps) {
new gfps = gDrunkLevelLast[playerid] - fps;
if ((gfps > 0) && (gfps < 200))
gFPS[playerid] = gfps;
gDrunkLevelLast[playerid] = fps;
}
}
if (
sscanf (
params,
"u", target)) target = playerid;
format(str,sizeof(str), "SERVER: %s's fps is %d", PlayerName, gFPS[target]);
SendClientMessage(playerid, -1, str);
return true;
}