[FilterScript] Simple PingKicker (hooked version included)
#1

Overview

Just figured I'd try out my new module-style coding and create this rather simple ping kicker. Nonetheless, maybe it'll be useful for someone, so here you go. A bit of customization is available, detailed below..

Information

Quote:
DIALOG_PINGKICKER - The dialogid associated with the Ping Kicker. (Uses 1 dialog)
MAX_PING - The maximum ping before the ping kicker is executed.
PING_CHECK_TIME - How often their ping is checked.
MAX_PING_WARNINGS - How many times their ping is checked.
PING_WARNINGMESSAGE - The message displayed every time their ping is over MAX_PING.

This ping kicker is called OnPlayerConnect, and uses a single timer which is destroyed after its allotted time is over with. The best part of this filterscript? Unless the player has a high ping - a normal player will never even know this is running!

Download

- pingkicker.pwn (Filterscript version)
- PK.pwn (module/hooked version)
Reply
#2

I don't like it....

Use one timer to check all the players in a foreach() loop creating a timer every time someone connects is silliness.
Reply
#3

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
I don't like it....

Use one timer to check all the players in a foreach() loop creating a timer every time someone connects is silliness.
Did you even look at the code? It creates the timer, checks what it needs to check, and then deletes itself..
Reply
#4

I looked at the code, and I said "I DON'T LIKE IT" it's a shitty implementation and shitty way to do it using a foreach() loop is much better as there is no need to create a timer for each player that is a complete nonsense way to do it.
Reply
#5

You would be much better off having a single running timer and using a foreach loop to determine if someone needs to have something said/done to them. Furthermore, I suggest that you take a look at the notice on the wiki about the GetPlayerPing function!

https://sampwiki.blast.hk/wiki/GetPlayerPing
Reply
#6

Suggestion: make something like /pingsettings to set/change max ping limit, ping check time and max ping warnings.
Reply
#7

Pretty harsh feedback.

Kudos for sharing your ideas anyway, although I hate high ping kickers, namely because I'm always on the receiving end.
Reply
#8

Quote:
Originally Posted by [KHK]Khalid
Посмотреть сообщение
Suggestion: make something like /pingsettings to set/change max ping limit, ping check time and max ping warnings.
That is very possible, will complete when I have some time.

Quote:
Originally Posted by freddy smyth
Посмотреть сообщение
Pretty harsh feedback.

Kudos for sharing your ideas anyway, although I hate high ping kickers, namely because I'm always on the receiving end.
I can see where you're coming from!

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You would be much better off having a single running timer and using a foreach loop to determine if someone needs to have something said/done to them. Furthermore, I suggest that you take a look at the notice on the wiki about the GetPlayerPing function!

https://sampwiki.blast.hk/wiki/GetPlayerPing
That warning is precisely why it checks it multiple times before kicking them, and you can change the interval on how often it checks yourself using the definition.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)