Warning: client exceeded "messageholelimit"
#1

I made a command, but I have a problem. The command works but it tells me that Warning, at the title. The command is:
pawn Код:
CMD:rac(playerid,params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        if(PlayerInfo[playerid][Level] >= 4)
        {
            new string[128];
            new bool:unwanted[MAX_VEHICLES];
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
            }
            for(new cars=0; cars<MAX_VEHICLES; cars++)
            {
                if(!unwanted[cars]) SetVehicleToRespawn(cars);
            }
            format(string,sizeof(string),"Administrator %s has respawn all unused vehicles.",pName(playerid));
            SendClientMessageToAll(blue,string);
        }
      else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
    return 1;
}
Thank you so much.
Reply
#2

Can you show me the error message?

EDIT: Nevermind, I noticed it in the title.
Reply
#3

So can anyone else try helping me?
Reply
#4

Bump, need help.
Reply
#5

My friend, try this code:

pawn Код:
CMD:rac(playerid,params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        if(PlayerInfo[playerid][Level] >= 4)
        {
            new string[128];
            new bool:unwanted[MAX_VEHICLES];
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerConnected(player) && IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
            }
            for(new cars=0; cars<MAX_VEHICLES; cars++)
            {
                if(!unwanted[cars]) SetVehicleToRespawn(cars);
            }
            format(string,sizeof(string),"Administrator %s has respawn all unused vehicles.",pName(playerid));
            for(new i; i<MAX_PLAYERS; i++)
            {
              if(IsPlayerConnected(i))
              {
                SendClientMessage(i,blue,string);
              }
            }
        }
      else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
    return 1;
}
Reply
#6

Quote:
Originally Posted by JR_Junior
Посмотреть сообщение
My friend, try this code:

pawn Код:
...
this command has nothing to do with "messageholelimit".

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
It's a low level protocol (RakNet) thing that was recently used to attack SA-MP servers.

Basically the client/player send a bunch of faked packet sequence IDs making the server think lots of packets/messages went missing on the internet due to packet loss.

The protocol stack will attempt to recover the missing packets by allocating space and waiting for the client to resend the missing packets. This uses a large amount of resources, and done over and over would eventually lag or even crash the server.

There were no hard limits on the number of missing messages the player could report. Each missing block of packets is considered to be a 'hole'. There was an attempt to fix this problem in 0.3x R2, although the limit was hardcoded to 1000 and sometimes players would falsely be detected as trying to DoS the server for having large message holes.

The server can now specify how big the missing packet hole is. But in most cases the default limit should be fine and most server owners won't have to worry about it.
Reply
#7

Hmm, but when I use the command the message comes to the console. What do you suggest me to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)