GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
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
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
anyone?
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
PLEASE?!?!?!?!?!? I really need this!!! PLZ!!!
Re: GetPlayerFps(playerid, variable); -
WillyP - 02.04.2011
SEARCH.
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
i have... i searched fps. nothing... please help me!!! maybe i will search a bit deeper... but i still need help.
Re: GetPlayerFps(playerid, variable); -
-Rebel Son- - 02.04.2011
Quote:
Originally Posted by [FU]Victious
SEARCH.
|
..+1
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
i cant find anything...
Re: GetPlayerFps(playerid, variable); -
Mean - 02.04.2011
Click here.
But this version isn't stable^^, when you use it, players can't move, I've tested it.
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
is there a better one?
\
Re: GetPlayerFps(playerid, variable); -
admantis - 02.04.2011
None released.
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
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
Re: GetPlayerFps(playerid, variable); -
linuxthefish - 02.04.2011
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...
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
hmmm... fak. is there any way to improve it? maybe use variables instead of PVar's
Re: GetPlayerFps(playerid, variable); -
sciman001 - 02.04.2011
anyone?