Simple Low Fps, High Ping Kick

Started by Kewun, Aug 20, 2016, 11:54 AM

Previous topic - Next topic

Kewun

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.

Cool

This can be done without timer see precious version pings

KAKAN

Take an average ping else if the ping fluctuates, the player would be keeked
oh no

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Kewun

I Only released a basic script. I dont need anyone's recommendation for other scripts.