Jump to content

Kick on disconnect


Anthrax

Recommended Posts

Hi all, I need help with this script

The script need kick player on minimal disconnect. Because many players used glitch, disconnect and connect very faster your router ( This gives an effect of teleportation ._. )

Here is the script:

function onPlayerDisconnect() 
 settimer( kickPlayer, 1000, 1, source, "prohibited the disconnection glitch" ) 
 end 
 addEvent("onPlayerDisconnect", getRootElement(), onPlayerDisconnect) 

please help me, thanks :wink:

Link to comment

This is what you want , but i dont think it's going to work , it may effect on your server and make it lag .. ,

addEventHandler('onPlayerQuit', root, 
function ( ) 
setTimer( kickPlayer, 1000, 1, source, 'prohibited the disconnection glitch') 
 end 
) 

Link to comment
Hi all, I need help with this script

The script need kick player on minimal disconnect. Because many players used glitch, disconnect and connect very faster your router ( This gives an effect of teleportation ._. )

Here is the script:

function onPlayerDisconnect() 
 settimer( kickPlayer, 1000, 1, source, "prohibited the disconnection glitch" ) 
 end 
 addEvent("onPlayerDisconnect", getRootElement(), onPlayerDisconnect) 

please help me, thanks :wink:

just log the player out when he disconnects for more than a second or something

Link to comment
This is what you want , but i dont think it's going to work , it may effect on your server and make it lag .. ,
addEventHandler('onPlayerQuit', root, 
function ( ) 
setTimer( kickPlayer, 1000, 1, source, 'prohibited the disconnection glitch') 
 end 
) 

'onPlayerQuit' is a quit of server voluntarily, isn't what I'm looking for...

When a player disconnect and connect your router "very fast", the connection is maintained a bit little second and not quit by connection lost. I need patch this.

In other word... kick on a minimal lost connection, not a quit player

Link to comment
Hi all, I need help with this script

The script need kick player on minimal disconnect. Because many players used glitch, disconnect and connect very faster your router ( This gives an effect of teleportation ._. )

Here is the script:

function onPlayerDisconnect() 
 settimer( kickPlayer, 1000, 1, source, "prohibited the disconnection glitch" ) 
 end 
 addEvent("onPlayerDisconnect", getRootElement(), onPlayerDisconnect) 

please help me, thanks :wink:

you cant kick the player after he left the server already,lol.

you would need to use some advanced techniques to calculate how long players werent playing and then if they werent playing for 1 second,you kick them

Link to comment
Check their pings, if there's a high ping spike.. not sure.

you remember me some thing important, when a player use the glitch the ping rise so fast that it shown difficult in the scores.

Here the script:

function DisconnectPlayer( Player ) 
if ( getPlayerPing( Player ) > 485 ) then 
 kickPlayer ( Player, "Prohibited the disconnection glitch" ) 
else 
 end 
 end 
  
function kickglitcher() 
setTimer ( DisconnectPlayer, 1000, 1, source ) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), kickglitcher ) 

the only thing I'm missing is that the rise ping detects in 1 millisecond (line 2), I don't know how to make it?

please help me D:

Regards :mrgreen:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...