Jump to content

Ping script


Guest Mondragon

Recommended Posts

Posted

hi guys im searching for a script where all players with a higher ping as 200-250 kick

can anyone help me please

Posted

For MTA 0.5:

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.maxplayers($1)) {
   if ($mta.ping($1,%a) >= 300) {
     mta.say $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
 }
}

For MTA:SA:

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.server($1).cmax) {
   if ($mta.ping($1,%a) >= 300) {
     mta.text $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
 }
}

Do not PM me, im not going to read it anyway.

Posted

Hi,

and how to use this script? sorry i´ve found nothing in the forum, plz help me...

Posted
Hi,

and how to use this script? sorry i´ve found nothing in the forum, plz help me...

Found nothing in the forum? You search bad :? There were millions of topics about that... You need mirc and mtama

Do not PM me, im not going to read it anyway.

Posted
For MTA 0.5:

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.maxplayers($1)) {
   if ($mta.ping($1,%a) >= 300) {
     mta.say $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
 }
}

For MTA:SA:

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.server($1).cmax) {
   if ($mta.ping($1,%a) >= 300) {
     mta.text $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
 }
}

wouldnt you need to increase %a ?

MTA Server Hosting (pm me for details!)

VCES / SAES Clan Member - VCES.net

Posted

agrh, my bad :( always forget that

Thnx for noticing panther :)

MTA0.5

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.maxplayers($1)) {
   if ($mta.ping($1,%a) >= 300) {
     mta.say $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
   !inc %a
 }
}

MTA:SA

on *:SIGNAL:mta.connect:{
 .timer $+ $1 0 10 mta.pingkick $1
}
alias mta.pingkick {
 var %a = 0
 while (%a <= $mta.server($1).cmax) {
   if ($mta.ping($1,%a) >= 300) {
     mta.text $1 Kicking $mta.name($1,%a) for high ping!
     mta.kick $1 %a
   }
   !inc %a
 }
}

Do not PM me, im not going to read it anyway.

  • 2 weeks later...
Posted
is this 1 only for 200-250 ping or can u change it

What you mean? Max allowed ping u can change in following line:

if ($mta.ping($1,%a) >= 300) {

Just replace the '300' number with anything you want

Do not PM me, im not going to read it anyway.

Posted

You forgot:

on *:SIGNAL:mta.disconnect:{
 .timer $+ $1 off
} 

"Never argue with an idiot. They bring you down to their level and beat you with experience."

"Arguing on the internet is like the Special Olympics. Even if you win, you're still retarded."

signature.gif

Posted
You forgot:

on *:SIGNAL:mta.disconnect:{
 .timer $+ $1 off
} 

mta.ban 1 $mta.getid(1,Aeron)

works without it anyway, will only give errors when you disconnect, but who cares :P:roll:

Do not PM me, im not going to read it anyway.

Posted

Hey,

Just a script that might be usefull to others, i use it in the XE Server to display your real ping, because i host scripts on a dedicated server beside our main one.

alias xe.ping {
 var %x = $ticks,%p = $$1,%f = c:\ $+ %p $+ .txt,%r = $iif($2 isnum,$2,1),%r = %r * 1000
 if ($com(ping $+ %x)) { .comclose ping $+ %x }
 .comopen ping $+ %x WScript.Shell
 if !$comerr { .comclose ping $+ %x $com(ping $+ %x,Run,3,bstr,$iif($istok(95 98 ME,$os,32),command.com,cmd.exe) /c ping %p -n 1 -w %r > %f,uint,0,bool,true) }
 %p = $read(%f,n,4)
 if (: isin %p) { .remove %f | return $gettok($gettok(%p,2-,58),2,32) }
 else { .remove %f | return Unknown }
}

Basically, pings the IP from the computer that has mirc running. Very fun to play with and very usefull.

Cya,

Tommis

xe6za.gif

banner.gif

Best game server hosting. America East&West Coast, and many European locations available.

Click on the above link to check us out!

Posted

Tommis, there's one thing.. not everyone hosts scripts on the same dedi as the server :P

For other people it will show the ping between player and admin, not between player and server :wink:

Do not PM me, im not going to read it anyway.

Posted

Hey,

I know, its just something to play with. Something to have fun with imo. Hope you know what i mean.

Cya,

Tommis

xe6za.gif

banner.gif

Best game server hosting. America East&West Coast, and many European locations available.

Click on the above link to check us out!

  • Recently Browsing   0 members

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