SA-MP Forums Archive
Ping check - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ping check (/showthread.php?tid=239511)



Ping check - tanush - 13.03.2011

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


Re: Ping check - xir - 13.03.2011

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)


Re: Ping check - ricardo178 - 13.03.2011

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....


Re: Ping check - antonio112 - 13.03.2011

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.