function onPlayerHighPingCheck(playername,playerid)
{
local player = FindPlayer(playerid);
if (player == null || player.Name != playername) return 0;
if ( player.Ping > 220 ) {
Message(player.Name + " has been kicked for high ping ("+player.Ping+")")
MessagePlayer("[#ff0000]You were kicked for high ping ("+player.Ping+")",player)
player.Kick();
}
}
function onPlayerLowFPS(playername,playerid)
{
local player = FindPlayer(playerid);
if (player == null || player.Name != playername) return 0;
if ( player.FPS < 20 ) {
Message("[#ff0000]Server Security System has kicked ("+player.Name + ") for low fps ("+player.FPS+")")
MessagePlayer("[#ff0000]You were kicked for low fps ("+player.FPS+")",player)
player.Kick();
}
}
onplayer join:
NewTimer("onPlayerLowFPS", 500, 0, player.Name, player.ID )
NewTimer("onPlayerHighPingCheck",500,0, player.Name, player.ID )
code tested, and works.
This can be done without timer see precious version pings
Take an average ping else if the ping fluctuates, the player would be keeked
This is better. (http://viceunderdogs.com/index.php?topic=7288)
I Only released a basic script. I dont need anyone's recommendation for other scripts.