indeed checking four times a minute is more then enough to determine if a player has a consant high ping. do you know how much strain the server will take if you check the ping each second xD. the webadmin api can't handle that. you would be looking at a near constant 'connection interrupted' icon ingame :lol: Currently i can query the webadmin API every 15 seconds for the playerlist and playerdetails (that is a max of 14 queries total each time) without overloading the server after a couple of minutes. This partially determines the 4 times a minute check. and besides you really don't need much more then that. Trust me that i know what i' m talking about. i have checked the limits of the webadmin API and my server. Can't believe this reached 5 pages xD.
Does the script require that they fail the max ping multiple times prior to kick? What are the requirements to determine the 'constant high ping'?
The database has an extra variable for each player that will show the number of pingchecks for that player.very query it is updated +1 for each player. For each player it is then checks if this variable equals the number of checks i set before i consider to kick a player. If it does and the ping is good the variable is reset to 0. if the ping is bad the player will be kicked. This way it won't matter if the player just joined, it will process each player individually. I' m currently integrating this in my stattracker script as an optional feature.
The number with other variables can be set in a .ini file. so it can be set to whatever positive number you'd like. I guess i will be using a value of 10 for my servers, giving the player several minutes to fix their issue. I'm not entirely sure yet.