Author Topic: [Request] Notify players by PM for ping warnings  (Read 4692 times)

0 Members and 1 Guest are viewing this topic.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
[Request] Notify players by PM for ping warnings
« on: November 11, 2006, 05:39:12 am »
Most players don't even know that they get ping warnings. So they suddenly get kick/banned without knowing what happened. Some nice scripter maybe can make me a script that will send a PM to the player with a notify that he is getting ping warnings and he is gonna get kicked and banned for 15 minutes ? Something like "Ping warning 1 out of <insert number of ping warnings here according to the server settings>"

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: [Request] Notify players by PM for ping warnings
« Reply #1 on: November 11, 2006, 07:06:07 am »
There isn't a way to determine when a player gets a ping warning using the scripting core. Possible with ARSSE though.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: [Request] Notify players by PM for ping warnings
« Reply #2 on: November 11, 2006, 07:57:08 am »
Not possible with ARSSE I think. OnData event doesn't support parameter $PLAYER_NAME :(

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: [Request] Notify players by PM for ping warnings
« Reply #3 on: November 11, 2006, 08:51:29 am »
what about checking all players ping every second?

and when server gives ping warning anyway?
if after 3 seconds of having too high ping then it's possible to determine...
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: [Request] Notify players by PM for ping warnings
« Reply #4 on: November 11, 2006, 08:58:47 am »
 cooz, I don't know how exactly this works. If you can make something it would be nice :)

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: [Request] Notify players by PM for ping warnings
« Reply #5 on: November 11, 2006, 09:08:38 am »
i can try, but i have to be 100% sure how ping warnirng system works otherwise script won't work precisely

could anyone with source of soldat server bring such knowledge here, please?  ::)
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline Mr. Domino

  • Flagrunner
  • ****
  • Posts: 969
  • Don't just sit there and waste your precious time.
    • XBLIG.co
Re: [Request] Notify players by PM for ping warnings
« Reply #6 on: November 11, 2006, 10:22:35 am »
This is a great idea, and on that note I think it'd be nice if the message was stored on the user's computer and displayed when trying to reconnect. Often times the kick comes so quickly that a player cannot see any messages to see the reason for it, and reconnect attempts just display the generic "You have been banned from this server" message.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: [Request] Notify players by PM for ping warnings
« Reply #7 on: November 11, 2006, 11:09:05 am »
Pings are checked every 420 ticks... So in AppOnIdle just do
Code: [Select]
if Ticks mod 420 = 0 then begin
  for i := 1 to 32 do
    if GetPlayerStat(i, 'ping') > MaxPing then begin
      WriteLn('ohhh a ping warning for ' + IDToName(i));
    end;

EDIT: Woops 2.6.0 function in there... suppliment it with some other sloppy workaround...

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: [Request] Notify players by PM for ping warnings
« Reply #8 on: November 11, 2006, 12:48:52 pm »
done, here it's some other sloppy workaround

edit:
btw Enesce, when pingwarnings reset?
« Last Edit: November 11, 2006, 12:52:32 pm by cooz »
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: [Request] Notify players by PM for ping warnings
« Reply #9 on: November 11, 2006, 01:37:36 pm »
I think they only get reset when you are actually kicked or if you otherwise leave the game, but I'm not sure if they get reset at any other time.
« Last Edit: November 11, 2006, 03:30:17 pm by chrisgbk »

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: [Request] Notify players by PM for ping warnings
« Reply #10 on: November 11, 2006, 01:44:57 pm »
ok, i made small update in scripts, but i'm still waitting for 100% sure information  ::)
eg. on leave game...
« Last Edit: November 11, 2006, 01:48:34 pm by cooz »
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: [Request] Notify players by PM for ping warnings
« Reply #11 on: November 12, 2006, 05:00:04 am »
cooz, there is still something wrong with the script. When I joined I saw a warning about -73 warnings remaining, after I changed "'strtoint(ReadINI('soldat.ini','NETWORK','Max_Ping_Warnings','10000'))' to 6, the number of warnings were right but it was like "0 more and you''ll be kicked" and then it went to "-1 more and you''ll be kicked", "-2 more and you''ll be kicked" ....

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: [Request] Notify players by PM for ping warnings
« Reply #12 on: November 15, 2006, 12:19:39 pm »
i have no clue why it's happening,
we've tested and values are read correctly from ini,
maybe just delete line which tells how many warnings left, for now
i'll look on it today later when i'll have acces to my server...

edit:
sorry for such delay, i didn't have mind for scripts for last few days,

i was testing pingWarning script and it works too randomly, i requested some feautures for next server version to better detect it... so for now let's give this script some time for rest
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like