/fps command
#4

You can get the player's rough FPS using drunk levels.

Quote:
Originally Posted by Jernelj
new pDrunkLevelLast[MAX_PLAYERS];
new pFPS[MAX_PLAYERS];

public OnPlayerConnect(playerid) {
pDrunkLevelLast[playerid] = 0;
pFPS[PlayerID] = 0;
}

public OnPlayerUpdate(playerid) {

// handle fps counters.

new drunknew;
drunknew = GetPlayerDrunkLevel(playerid);

if (drunknew < 100) { // go back up, keep cycling.
SetPlayerDrunkLevel(playerid, 2000);
} else {

if (pDrunkLevelLast[playerid] != drunknew) {

new wfps = pDrunkLevelLast[playerid] - drunknew;

if ((wfps > 0) && (wfps < 200))
pFPS[playerid] = wfps;

pDrunkLevelLast[playerid] = drunknew;
}

}

}
Source: https://sampforum.blast.hk/showthread.php?tid=172085
Reply


Messages In This Thread
/fps command - by Airman123 - 07.02.2015, 16:40
Re: /fps command - by MicroD - 07.02.2015, 16:47
Re: /fps command - by CalvinC - 07.02.2015, 16:48
Re: /fps command - by Puppy - 07.02.2015, 16:48
Re: /fps command - by Airman123 - 07.02.2015, 16:58
Re: /fps command - by Airman123 - 07.02.2015, 17:06

Forum Jump:


Users browsing this thread: 2 Guest(s)