Anthrax Posted June 16, 2014 Share Posted June 16, 2014 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 Link to comment
Max+ Posted June 16, 2014 Share Posted June 16, 2014 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
aintaro Posted June 16, 2014 Share Posted June 16, 2014 Hi all, I need help with this scriptThe 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 just log the player out when he disconnects for more than a second or something Link to comment
Anthrax Posted June 16, 2014 Author Share Posted June 16, 2014 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
toxicsmoke11 Posted June 16, 2014 Share Posted June 16, 2014 Hi all, I need help with this scriptThe 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 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
.:HyPeX:. Posted June 16, 2014 Share Posted June 16, 2014 Check their pings, if there's a high ping spike.. not sure. Link to comment
Anthrax Posted June 17, 2014 Author Share Posted June 17, 2014 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 Link to comment
Et-win Posted June 17, 2014 Share Posted June 17, 2014 You can only put 50 ms or up into a Timer. setTimer "timeInterval: The number of milliseconds that should elapse before the function is called. (the minimum is 50)(1000 milliseconds = 1 second)" Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now