Posts: 395
Threads: 10
Joined: Dec 2010
Reputation:
0
Also note that the players ping could be like 9999 several seconds after he/she connected.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by _rAped
Also note that the players ping could be like 9999 several seconds after he/she connected.
|
When a player connects their ping is 65535 and it takes about a second or two for it to resolve to their normal ping. Add an additional variable and add on to it every second, after two or three seconds then check their ping and allow your timer to keep checking whether the player has been connected for long enough to be ping kicked.
Posts: 2,726
Threads: 85
Joined: Jul 2010
Reputation:
0
I've seen alot of people having 65535 ping, well just do a SetTimerEx under OnPlayerSpawn with repeating on.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by Mean
I've seen alot of people having 65535 ping, well just do a SetTimerEx under OnPlayerSpawn with repeating on.
|
That's generally inefficient, you could quite possibly end up with 500 timers. You should create a variable and set its value once a player has spawned, and a timer (containing a loop) will check the value and kick the player if the value is set and their ping is excessive.
Unrelated to the topic, I think you should re-consider the ping limit, 300 isn't too bad for a ping anyway - 500+ is.