Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Leo 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>"
-
There isn't a way to determine when a player gets a ping warning using the scripting core. Possible with ARSSE though.
-
Not possible with ARSSE I think. OnData event doesn't support parameter $PLAYER_NAME :(
-
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...
-
cooz, I don't know how exactly this works. If you can make something it would be nice :)
-
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? ::)
-
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.
-
Pings are checked every 420 ticks... So in AppOnIdle just do
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...
-
done, here it's some other sloppy workaround (http://forums.soldat.pl/index.php?topic=7574)
edit:
btw Enesce, when pingwarnings reset?
-
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.
-
ok, i made small update in scripts, but i'm still waitting for 100% sure information ::)
eg. on leave game...
-
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" ....
-
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