FPS kicker
#1

Code:
  new strg1[256], strg2[256];
            new PlayerName[16];
            GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
         	if ((wfps > 0 ) && (wfps < 25 ))
         	pFPS[playerid]= wfps;
   	        format(strg1, sizeof(strg1), "%s has been kicked from the Server. Reason - Average fps is %d", PlayerName, pFPS);
            SendClientMessageToAll(COLOR_GREEN, strg1);
            format(strg2, sizeof(strg2), "You have been kicked from the server. Reason - Average fps is %d", pFPS);
            SendClientMessage(playerid, COLOR_GREEN, strg2);
            Kick(playerid);
there is no error's but every thing i test this code it kick with average fps is 0 and when i remove the pFps[playerid]= wfps; it kick me with average fps -1900
Reply
#2

Whats the fps you want the player to get kicked on?
EDIT:
Where are you putting that part of code?it should be in a timer/OnPlayerUpdate.
Reply
#3

its onPlayerUpdate

this full code ping kicker and fps kicker
Code:
#define MAX_PING 180
Code:
public OnPlayerUpdate(playerid) {

    
      new string[256], string2[256];
      new PlayerName[16];
      GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
      if(GetPlayerPing(playerid) >= MAX_PING)
        {
        format(string, sizeof(string), "%s has been kicked from the Server. Reason - Average ping is %d", PlayerName, MAX_PING);
        SendClientMessageToAll(COLOR_GREEN, string);
        format(string2, sizeof(string2), "You have been kicked from the server. Reason - Average ping is %d", MAX_PING);
        SendClientMessage(playerid, COLOR_GREEN, string2);
        Kick(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;
          
             new strg1[256], strg2[256];
 -  388    new PlayerName[16];
 -  389    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
         	if ((wfps > 0 ) && (wfps < 25 ))
         	pFPS[playerid]= wfps;
   	        format(strg1, sizeof(strg1), "%s has been kicked from the Server. Reason - Average fps is %d", PlayerName, pFPS);
            SendClientMessageToAll(COLOR_GREEN, strg1);
            format(strg2, sizeof(strg2), "You have been kicked from the server. Reason - Average fps is %d", pFPS);
            SendClientMessage(playerid, COLOR_GREEN, strg2);
            Kick(playerid);
        }

    }

}
Reply
#4

Why on earth kick people with low FPS? This doesn't affect anyone but themselves.
Reply
#5

new Playername[16] : It's invalid because maximum character size of a name is 24. You can either use Playername[24] or Playername[MAX_PLAYER_NAME]
Reply
#6

Quote:
Originally Posted by LarzI
View Post
Why on earth kick people with low FPS? This doesn't affect anyone but themselves.
It does. A player with low fps can't be damaged easily.

@AzTeCaS
- Take a look to JernejL's post about FPS
Reply
#7

Quote:
Originally Posted by LarzI
View Post
Why on earth kick people with low FPS? This doesn't affect anyone but themselves.
Actually, it can cause a lot of issues for other people too.
Reply
#8

Quote:
Originally Posted by Dwane
View Post
It does. A player with low fps can't be damaged easily.
This is not even nearly logical. FPS = frames rendered per second for the player. This can't affect online gaming at all. Updaterates and latency, however, does.
Reply
#9

Quote:
Originally Posted by LarzI
View Post
This is not even nearly logical. FPS = frames rendered per second for the player. This can't affect online gaming at all. Updaterates and latency, however, does.
It does. I've been DMing for a long time and I've DMed with people that they had either high pings or low fps.
Believe me! You don't want to duel a player with 1 fps, he doesn't get damage from bullets at all while he's moving. However, if he doesn't move, then he gets damage. I was admin on that server and I could check if he was cheating or not and he didn't. I've tried to slap/drop him and he was getting damage.

As I said, fps can affect the game and low fps can give you advantages to a lot of things. However, the game is lagging so bad and you can't play normally.
Reply
#10

Quote:
Originally Posted by Dwane
View Post
It does. I've been DMing for a long time and I've DMed with people that they had either high pings or low fps.
Believe me! You don't want to duel a player with 1 fps, he doesn't get damage from bullets at all while he's moving. However, if he doesn't move, then he gets damage. I was admin on that server and I could check if he was cheating or not and he didn't. I've tried to slap/drop him and he was getting damage.

As I said, fps can affect the game and low fps can give you advantages to a lot of things. However, the game is lagging so bad and you can't play normally.
Ah yes of course. Rockstar never intended multiplayer support, thus ignored things like these as they don't affect singleplayer when they created the game. Sorry for being ignorant - thanks for providing "proof"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)