Blueman Posted June 21, 2011 Share 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 ) Link to comment
SDK Posted June 21, 2011 Share Posted June 21, 2011 if ( getPlayerPing( ThePlayer ) < 90 ) then shouldn't that be: if ( getPlayerPing( ThePlayer ) > 90 ) then Link to comment
Blueman Posted June 21, 2011 Author Share Posted June 21, 2011 OOps maybe that explains why it kicks me. < less then >Greater than Link to comment
BinSlayer1 Posted June 21, 2011 Share Posted June 21, 2011 make a table for the timer because more people could join at the same time Link to comment
Blueman Posted June 21, 2011 Author Share Posted June 21, 2011 I was thinking about that. 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