Jump to content

Pingkicker


Niels

Recommended Posts

on *:SIGNAL:mta.connect:{
 set %online. [ $+ [ $1 ] ] true
}
on *:SIGNAL:mta.start:{
 .timerping 0 10 checkpings 
} 
on *:SIGNAL:mta.quit:{
 .timerping off 
}
on *:SIGNAL:mta.join:{
 unset %ping. [ $+ [ $2 ] $+ ] * 
 set %loop. [ $+ [ $2 ] ] 0 
}
on *:SIGNAL:mta.disconnect:{
 unset %online. [ $+ [ $1 ] ] 
}
alias checkpings { 
 set %server 0 
 if ( %max == $null ) echo -a Maximum ping not set, pingkick off 

 set %ping_counter $calc( %ping_counter + 1 ) 
 if ( %ping_counter > 12 ) { 
   set %ping_counter 0 
 }  
 while ( %server < 9 ) {      
   if ( %online. [ $+ [ %server ] ] == true ) { 
     set %playerid 0 
     while ( %playerid < $mta.maxplayers($1) ) { 
       set %ping. [ $+ [ %server ] $+ . $+ [ %playerid ] $+ . $+ [ %ping_counter ] ] $mta.ping( %server , %playerid )      
       set %dummy 0 
       set %totalping 0 
       while ( %dummy < 13 ) { 
         inc %totalping %ping. [ $+ [ %server ] $+ . $+ [ %playerid ] $+ . $+ [ %dummy ] ] 
         inc %dummy 1 
       } 
       set %averageping. [ $+ [ %server ] $+ . $+ [ %playerid ] ] $round($calc( %totalping / 13 ) , 0 ) 
       if ( %averageping. [ $+ [ %server ] $+ . $+ [ %playerid ] ] > %max ) && (%rights. [ $+ [ %server ] $+ . $+ [ %playerid ] ] == 0) {  
         mta.say %server Kicking $mta.name( %server, %playerid ) for a ping of $round(%averageping. [ $+ [ %server ] $+ . $+ [ %playerid ] ] , 2) $+ , maximum is %max $+ .
         mta.kick %server %playerid 
         unset %averageping. [ $+ [ %server ] $+ . $+ [ %playerid ] ] 
         unset %ping. [ $+ [ %server ] $+ . $+ [ %playerid ] $+ ] * 
       }
     } 
     inc %playerid 1 
   } 
 } 
 inc %server 1 
} 
unset %server 
} 

This pingkicker is don't work, can somone fix it? mIRC is crashing every time :evil:

Link to comment

fucking hell i really am starting to have a physical passionate hatred of u.. after months and months of this shit u still dont know what the fuck you are doing!

/me refuses to help this complete fuck wit any more

Link to comment
Why do you keep posting extremely old scripts? I DO know this one, because all my typo's are still in there.

Just learn to program, and not copy them like a mad man, might be better for all of us

Stern, but fair! on the subject, anyone got any tips, well.. links that can help start me off.. i started but gave up due to getting another day job.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...