Blueman Posted June 21, 2011 Posted June 21, 2011 I built a simple code to kick a person a short ammount of time after connecting if it is above 90 but it just kicks everyone. My code: function pingkicker( ThePlayer ) if ( getPlayerPing( ThePlayer ) < 90 ) then kickPlayer ( ThePlayer, "High Ping" ) else end end function kicktimer() setTimer ( pingkicker, 15000, 1, source ) end addEventHandler ( "onPlayerJoin", getRootElement(), kicktimer ) It's amazing what people will sell nowadays $500 for an animated gif
SDK Posted June 21, 2011 Posted June 21, 2011 if ( getPlayerPing( ThePlayer ) < 90 ) then shouldn't that be: if ( getPlayerPing( ThePlayer ) > 90 ) then Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
Blueman Posted June 21, 2011 Author Posted June 21, 2011 OOps maybe that explains why it kicks me. < less then >Greater than It's amazing what people will sell nowadays $500 for an animated gif
BinSlayer1 Posted June 21, 2011 Posted June 21, 2011 make a table for the timer because more people could join at the same time
Blueman Posted June 21, 2011 Author Posted June 21, 2011 I was thinking about that. It's amazing what people will sell nowadays $500 for an animated gif
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