how to make a ping
#4

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
You don't need to use y_ini or any file systems for saving the maximum ping of the server. A simple define is enough or a variable.
pawn Код:
#define MAX_PING 54321  //Add your value.

public OnFilterScriptInit()
{
 SetTimer("DetectPing", 2000, true); //A timer would be better in handling ping detection.
 return 1;
}
forward DetectPing();

public DetectPing()
{
 for(new i; i< GetMaxPlayers(); i++)
 {
  if(!IsPlayerConnected(i)); continue;
  if(GetPlayerPing(playerid) >= MAX_PING) return Kick(playerid);
 }
 return 1;
}
Btw, you can't set anyone's ping atm.
He said ingame set xD
Reply


Messages In This Thread
how to make a ping - by DerickClark - 24.12.2012, 07:04
Re: how to make a ping - by DaRk_RaiN - 24.12.2012, 07:27
Re: how to make a ping - by Lordzy - 24.12.2012, 08:22
Re: how to make a ping - by DaRk_RaiN - 24.12.2012, 08:47
Re: how to make a ping - by Vince - 24.12.2012, 11:15

Forum Jump:


Users browsing this thread: 1 Guest(s)