Jump to content

Need !warn script


Recommended Posts

 
alias mta.warn { 
 if ($4 != $null) { 
   if ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 1 ) { 
     if ($5 != $null) { 
       mta.say $1 $mta.name($1,$4) $+ : 2nd warning. 1 more warning and you will be kicked. Reason: $5- 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 2 
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5- 
     } 
     else { 
       mta.say $1 $mta.name($1,$4) $+ : 2nd warning. 1 more warning and you will be kicked. 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 2 
     } 
   } 
   elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 2 ) { 
     if ($5 != $null) { 
       mta.say $1 $mta.name($1,$4) $+ : 3rd and final warning. Reason: $5- $+ . Goodbye! 
       mta.kick $1 $4 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 3 
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5- 
     } 
     else { 
       mta.say $1 $mta.name($1,$4) $+ : 3rd and final warning. Goodbye! 
       mta.kick $1 $4 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 3 
     } 
   } 
   else { 
     if ($5 != $null) { 
       mta.say $1 $mta.name($1,$4) $+ : 1st warning. 2 more warnings and you will be kicked. Reason: $5- 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 1 
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5- 
     } 
     else { 
       mta.say $1 $mta.name($1,$4) $+ : 1st warning. 2 more warnings and you will be kicked. 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 1 
     } 
   } 
 } 
 else { 
   mta.say $1 $mta.name($1,$2) $+ : Syntax - !warn 
 } 
}

on *:SIGNAL:mta.join: {
   elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 3 ) { 
   mta.say $1 $mta.name($1,$2) $+ : Access denied - exceeded warn quota 
   writeini "MTAwarn.ini" joinkick $mta.name($1,$2) $mta.ip($1,$2) 
   mta.kick $1 $2 
 }
}
on *:SIGNAL:mta.command: {
 if ($3 == !warn) && ($mta.name($1,$2) == [TMG]Energy) {
   mta.warn $1- 
 } 
 if ($3 == !warnings) { 
   if ($4 != $null) { 
     if ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 1 ) { 
       mta.say $1 $mta.name($1,$4) has been warned 1 time. 
     } 
     elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 2 ) { 
       mta.say $1 $mta.name($1,$4) has been warned 2 times. 
     } 
     else { 
       mta.say $1 $mta.name($1,$4) has been warned 0 times. 
     } 
   } 
   else { 
     if ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 1 ) { 
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 1 time. 
     } 
     elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 2 ) { 
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 2 times. 
     } 
     else { 
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 0 times. 
     } 
   } 
 } 
 if ($3 == !erasewarn) && ($mta.name($1,$2) == [TMG]Energy) { 
   if ($4 != $null) { 
     mta.say $1 $mta.name($1,$2) $+ : Removed warnings on $4 
     remini "MTAwarn.ini" main $4 
     remini "MTAwarn.ini" joinkick $4 
     remini "MTAwarn.ini" reasons $4 
   } 
   else { 
     mta.say $1 Syntax: !erasewarn 
   } 
 }
}

Script by oli

Link to comment

it's work but one problem...

} 
 if ($3 == !erasewarn) && ($mta.name($1,$2) == [TMG]Energy) { 
   if ($4 != $null) { 
     mta.say $1 $mta.name($1,$2) $+ : Removed warnings on $4 
     remini "MTAwarn.ini" main $4 
     remini "MTAwarn.ini" joinkick $4 
     remini "MTAwarn.ini" reasons $4 
   } 
   else { 
     mta.say $1 Syntax: !erasewarn 
   } 
 } 
}

i must do --> !erasewarn [TMG]Energy

i will can do --> !erasewarn Energy (or ene, ener or ID number)

Link to comment

if ($3 == !erasewarn) && ($mta.name($1,$2) == [TMG]Energy) {
   if ($4 != $null) {
     mta.say $1 $mta.name($1,$2) $+ : Removed warnings on $mta.name($1,$4)
     remini "MTAwarn.ini" main $mta.name($1,$4)
     remini "MTAwarn.ini" joinkick $mta.name($1,$4)
     remini "MTAwarn.ini" reasons $mta.name($1,$4)
   }
   else {
     mta.say $1 Syntax: !erasewarn 
   }
 }
}

Try this this is working by id.

Link to comment
  • Recently Browsing   0 members

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