GetPlayerFps(playerid, variable);
#1

Is it possible to make a GetPlayerFps function? I have seen a /fps command in servers and... i want to make a textdraw that shows my fps. HOW
Reply
#2

anyone?
Reply
#3

PLEASE?!?!?!?!?!? I really need this!!! PLZ!!!
Reply
#4

SEARCH.
Reply
#5

i have... i searched fps. nothing... please help me!!! maybe i will search a bit deeper... but i still need help.
Reply
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
SEARCH.
..+1
Reply
#7

i cant find anything...
Reply
#8

Click here.
But this version isn't stable^^, when you use it, players can't move, I've tested it.
Reply
#9

is there a better one?
\
Reply
#10

None released.
Reply
#11

well... ok.. heres my code now:

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;
}
It "workd..." it sometimes gets the fps... and sometimes returns 0. what should i do
Reply
#12

Quote:
Originally Posted by sciman001
Посмотреть сообщение
well... ok.. heres my code now:

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;
}
It "workd..." it sometimes gets the fps... and sometimes returns 0. what should i do
I think this is the only way to get the players FPS, don't exept it to work to well on a server with lots of players or a big script...
Reply
#13

hmmm... fak. is there any way to improve it? maybe use variables instead of PVar's
Reply
#14

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)