Ping check
#1

where do i put if(GetPlayerPing(playerid) > 1000) Kick(playerid); please help
Reply
#2

I think OnPlayerSpawn.

Because when you do it OnPlayerConnect, it will kick everyone, because right when you join the server you get a ping like above 60000(but still not sure)
Reply
#3

Hum, i am not sure, i think it is above OnGameModeInit coz OnPlayerSpawn just check when you spawn.... If you be with 30000 ping only when you die, you get kicked... By the way, try it, i am not 100% sure!
Or make a timer to check ping all 1 minute for example, but i don't know if this will lagg....
Reply
#4

A timer is the best solution in my opinion ... Or you can even make a timer to check their ping and if their ping is over 1000 let`s say and give them a HighPing variable + 1 ... and when their HighPing variable hits 3, bam, kick !

That`s for players who, connects right in the second when the timer runs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)