Jump to content

addban all servers


(OVG)Santi

Recommended Posts

Posted

How for when i type !addban or !ban this ban the player or ip in all of ,y server, i have 3

what i must do for that happens i know is ban $1 $2 but how for $1 refer to the 3 server in the same time????

Posted

you could say mta.ban (id of the servers) $2

eg:

if ($3 == !addban) {

var %poo = .......... (to get id etc)

.....

mta.ban 1 %poo

mta.ban 2 %poo

mta.ban 3 %poo

}

...

(if you're using mtama then 1, 2 & 3 are the first 3 server tabs respectively)

Posted
tell me is it 0.5 or SA and give me ur ban commands

Is for mta:sa

var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getnick($1,$4)),$2)
 if ($3 == !addban) {
   if ($4) {
     if ($readini($mta.dir $+ admin.ini,admin,$mta.nick($1,$2)) >=  {
       mta.addban $1 $mta.ip($1,%a)
       mta.text $1 The nick $mta.nick($1,%a) is banned! Reason: $5-
     }
     else mta.pm $1 $2 You need be admin level 8 or more for use this command!
   }
 }
}

Here is the scrip if you can modify this for when i type (or other admin lvl 8 or more) !addban this ban the he/she in all of my servers thanks you!

is you found any error in this scripts dont worry later i will check

Posted
on *:SIGNAL:mta.command:{
 var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getnick($1,$4)),$2)
 if ($3 == !addban) {
   if ($readini($mta.dir $+ admin.ini,admin,$mta.nick($1,$2)) >=  {
     if (%a == -1) mta.msg $1 $2 Error - Absent ID
     elseif (%a == $2) mta.msg $1 $2 Error - Can't ban yourself
     elseif (($4) && (*.*.*.* iswm $4)) {
       var %b = 1
       while (%b <=  {
         if ($exists($mta.dir $+ %b.ini)) mta.addban %b $mta.ip($1,%a)
         !inc %b
       }
       mta.text $1 The nick $mta.nick($1,%a) is banned! Reason: $5-
     }
   }
   else mta.pm $1 $2 You need be admin level 8 or more for use this command!
 }
}

Posted
on *:SIGNAL:mta.command:{
 var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getnick($1,$4)),$2)
 if ($3 == !addban) {
   if ($readini($mta.dir $+ admin.ini,admin,$mta.nick($1,$2)) >=  {
     if (%a == -1) mta.msg $1 $2 Error - Absent ID
     elseif (%a == $2) mta.msg $1 $2 Error - Can't ban yourself
     elseif (($4) && (*.*.*.* iswm $4)) {
       var %b = 1
       while (%b <=  {
         if ($exists($mta.dir $+ %b.ini)) mta.addban %b $mta.ip($1,%a)
         !inc %b
       }
       mta.text $1 The nick $mta.nick($1,%a) is banned! Reason: $5-
     }
   }
   else mta.pm $1 $2 You need be admin level 8 or more for use this command!
 }
}

thanks you for you help!!! for all the times!

  • 2 weeks later...
Posted

i write the scrip bad or the scrip dont work????

on *:SIGNAL:mta.nick:{
 if ($mta.nick($1,$2) == $mta.nick($1,$2)) {
   if ($mta.nick($1,$2) == Player) {
     if ($mta.dead($1,$2) == $false) {     
       mta.pm $1 $2 Please change your nick now! press esc and go to settings
       mta.freeze $1 $2           
     }
     else mta.pm $1 $2 Please change your nick now! press esc and go to settings
   }
   else {
     mta.unfreeze $1 $2
     !.timer 1 10 mta.unfreeze $1 $2        
   }  
 }
}

thx again

Posted

well, it will work, but there's a bug in it, which allows frozen players to unfreeze themselves :roll: (just change nick to anything and u're unfreezed)

Posted

for me dont work this part, what is the problem?

if ($mta.dead($1,$2) == $false) {

and that is true mof the unfreeze but when some player is freeze for somethings tk nothings more and if you are frezeeed for do tk and change your nick for unfreeze i kick you lol

  • Recently Browsing   0 members

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