Help? Timeouts?
#2

Option 1:

kick players with ping higher then 300?
pawn Code:
public PingKick()
{
      for(new i = 0,string[256],name[24]; i < MAX_PLAYERS; i++)
      if(IsPlayerConnected(i) && (GetPlayerPing(i) > 300))
  {
            GetPlayerName(i,name,24); format(string,256,"\"%s\" has been kicked from the server. (Reason: High Ping || Max Allowed: %d)",name,Config[MaxPing]);
            SendClientMessageToAll(yellow,string); Kick(i);
      }
}
This needed at beginning of script :
pawn Code:
forward PingKick();
And this in 'OnGameModeInit()' :
pawn Code:
SetTimer("PingKick",10000,true); // gonna check every 10 seconds for to high ping
*CREDITS XTreme (taken from his xadmin FS)

Option 2:
Blame your parents/provider/internet product for the bad connection peeps having on your server.

Hopefully for you there are more experienced users with other options


Ps: first 'code' post so correct my mistakes pls




Reply


Messages In This Thread
Help? Timeouts? - by JonathanRulez09 - 01.08.2009, 00:57
Re: Help? Timeouts? - by Rizard - 01.08.2009, 17:21

Forum Jump:


Users browsing this thread: 1 Guest(s)