My FPS command.
#1

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.)

PHP код:
CMD:fps(playeridparams[])
{
   new
        
fps,
        
target,
        
str[64],
        
PlayerName[MAX_PLAYER_NAME];
   
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
   
   
fps GetPlayerDrunkLevel(target);
   if(
fps 100) {
      
SetPlayerDrunkLevel(target2000);
   } 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"PlayerNamegFPS[target]);
   
   
SendClientMessage(playerid, -1str);
   return 
true;

Reply


Messages In This Thread
My FPS command. - by ivndosos - 12.03.2018, 21:10
Re: My FPS command. - by ivndosos - 13.03.2018, 09:57
Re: My FPS command. - by Kane - 13.03.2018, 10:02
Re: My FPS command. - by ivndosos - 13.03.2018, 10:36
Re: My FPS command. - by NaS - 13.03.2018, 18:00
Re: My FPS command. - by ivndosos - 15.03.2018, 12:10
Re: My FPS command. - by NaS - 15.03.2018, 12:35

Forum Jump:


Users browsing this thread: 3 Guest(s)