SA-MP Forums Archive
GetPlayerFPS(playerid); - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerFPS(playerid); (/showthread.php?tid=254651)



GetPlayerFPS(playerid); - sciman001 - 12.05.2011

Hi all. I was just wondering... on MANY servers, i've seen fps meters or monitors... and i need to get the GetPlayerFPS(playerid) function!!! PLEASE! DONT TELL ME THE ONE WITH DRUNK LEVEL! The one that uses drunk level... it only returns the actual player's fps every... 1 out of 10 times... for me at least... So, i ask you... PLEASE!!! TELL ME THE CODE FOR THE FUNCTION!!!!!


Re: GetPlayerFPS(playerid); - Donya - 12.05.2011

there is no other way


Re: GetPlayerFPS(playerid); - sciman001 - 12.05.2011

sure there is! I'VE SEEN IT IN OTHER SERVERS!!! Maybe a plugin could do it? idk... PLEASE HELP!!!!!


Re: GetPlayerFPS(playerid); - Donya - 12.05.2011

Quote:
Originally Posted by Donya
Посмотреть сообщение
there is no other way Currently
just use fraps


Re: GetPlayerFPS(playerid); - Hal - 12.05.2011

Quote:
Originally Posted by sciman001
Посмотреть сообщение
sure there is! I'VE SEEN IT IN OTHER SERVERS!!! Maybe a plugin could do it? idk... PLEASE HELP!!!!!
ask those servers!!


Re: GetPlayerFPS(playerid); - sciman001 - 12.05.2011

i want it for ALL players whether they have fraps or not! it HAS to be possible... look at this:

pawn Код:
stock GetPlayerFPS(playerid)
{
    SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
    if(GetPVarInt(playerid, "DrunkL") < 100)
    {
        SetPlayerDrunkLevel(playerid, 2000);
    }
    else
    {
        if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))
        {
            SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
            SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
            if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256))
            {
                return GetPVarInt(playerid, "FPS") - 1;
            }
        }
    }
    return 0;
}
Maybe if i replace the pvars with regulat vars.. globals.. would it work then? I mean.. this returnes the correct fps about.. 1 every 12 times... and thats wen its on OnPlayerUpdate... i KNOW its possible. And i REALLY want it! It is possible with a lot of work.. maybe a plugin as said before.. idk.. but maybe.. maybe me and some other peoplez could develop it... maybe... i hope so anyway... Please dont give this up... it HAS to be possible. I will NEVER give up. maybe... we could maybe figure out how fraps does it and then code that method into a plugin or something.. idk.. i just really need this! PLEASE DONT GIVE UP!!!


Re: GetPlayerFPS(playerid); - Donya - 12.05.2011

dude i told you! there are no plugins for this, STOP CAPSLOCKING, there is NO other SOLUTION Available right NOW...


Re: GetPlayerFPS(playerid); - sciman001 - 12.05.2011

ok. i guess maybe itll b in 0.4 server. i hope. anyway... thx. :/


Re: GetPlayerFPS(playerid); - Whitetiger - 12.05.2011

This is possible.. http://forum.sa-mp.com/showthread.ph...t=GetPlayerFPS

here is a filterscript utilizing it: http://forum.sa-mp.com/showthread.ph...t=GetPlayerFPS

edit: your "GetPlayerFPS" function is done wrong, the one you have done, will not work you need to put that code in OnPlayerUpdate and then make GetPlayerFPS return the FPS pvar.


Re: GetPlayerFPS(playerid); - leong124 - 12.05.2011

First of all stop shouting.
The second thing is that drunk level method is the only method to do that in pawn.
If you want a faster update, lower the timer tick rate.