Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

 if ($3 == !clanban) {
   if ($4 != $null) { 
     %a = 0 
     while (%a < $mta.maxplayers($1)) { 
       if ($4 isin $mta.name($1,%a)) {
         if ($5 == $null) mta.say $1 All members of clan $4 are banned.
         else mta.say $1 All members of clan $4 are banned, Reason: $5-
         writeini "shitlist.ini" Clanban clan $4 ;<-- What edit my here?
         mta.ban $1 %a 
       } 
       inc %a 1 
     } 
     unset %a 
   } 
   else mta.say $1 $mta.name($1,$2) Syntax: !clanban 
 }  

Link to comment
  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Advanced Ban Scripts

alias mta.findid {
 var %a = 0
 while (%a <= $readini($mta.dir $+ mta.ini,$1,max))  {
   if $2 isnum { 
     if $mta.name($1,$2) != Unknown { !return $2 }
     else {
       var %b = 0
       while %b <= $readini($mta.dir $+ mta.ini,$1,max) {
         if ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %b,name)) !return %b
         !inc %b
       }
       !return -1
     }
   }
   elseif ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %a,name)) !return %a
   !inc %a
 }
 !return -1
}
on *:SIGNAL:mta.command: {
var %b = $iif($4 == $null,$2,$mta.findid($1,$4)))
elseif $3 == !ban {
 if $2 == %b mta.msg $1 $2 Error - You cannot ban you
   else {
     if %b == -1 mta.say $1 Error - Invalid ID
       else { 
         mta.say $1 $+(',$mta.name($1,%b),') is banned by admin $+(',$mta.name($1,$2),':) $iif($5,$5-,No reason.)
         !writeini -n "MTAbans.ini" banreasons $mta.name($1,%b) $5- $date $time $mta.name($1,$2)
         !writeini -n "MTAbans.ini" bannedip $mta.name($1,%b) $mta.ip($1,%b) $date $time $mta.name($1,$2)
         !writeini -n "MTAbans.ini" main $mta.name($1,%b) 4
         !writeini -n "data.ini" ip $gettok($mta.ip($1,$2),1-2,46) $mta.name($1,%b)
         mta.ban $1 %b
       }
     }
     elseif $3 == !blacklist {
       if %b == -1 mta.say $1 Error - Invalid ID
       else mta.say $1 $mta.name($1,%b) - Added to the Blacklist
       !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.ip($1,%b) 1
       !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.name($1,%b) 1
       !writeini -n "blacklist.ini" $mta.name($1,%b) $gettok($mta.ip($1,$2),1-2,46) 1
       mta.ban $1 %b          
     }
   }
 }
}
on *:SIGNAL:mta.join: {
 if ($gettok($mta.ip($1,$2),1-2,46)) && $readini(data.ini,shortip,$gettok($mta.ip($1,$2),1-2,46)) { 
   mta.say $1 Warning: $mta.name($1,$2) - First 2 ip groups match $readini(data.ini,ip,$gettok($mta.ip($1,$2),1-2,46)), who was banned. $+
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$mta.ip($1,$2)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$mta.name($1,$2)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$gettok($mta.ip($1,$2),1-2,46)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
}

Link to comment
Advanced Ban Scripts

alias mta.findid {
 var %a = 0
 while (%a <= $readini($mta.dir $+ mta.ini,$1,max))  {
   if $2 isnum { 
     if $mta.name($1,$2) != Unknown { !return $2 }
     else {
       var %b = 0
       while %b <= $readini($mta.dir $+ mta.ini,$1,max) {
         if ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %b,name)) !return %b
         !inc %b
       }
       !return -1
     }
   }
   elseif ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %a,name)) !return %a
   !inc %a
 }
 !return -1
}
on *:SIGNAL:mta.command: {
var %b = $iif($4 == $null,$2,$mta.findid($1,$4)))
elseif $3 == !ban {
 if $2 == %b mta.msg $1 $2 Error - You cannot ban you
   else {
     if %b == -1 mta.say $1 Error - Invalid ID
       else { 
         mta.say $1 $+(',$mta.name($1,%b),') is banned by admin $+(',$mta.name($1,$2),':) $iif($5,$5-,No reason.)
         !writeini -n "MTAbans.ini" banreasons $mta.name($1,%b) $5- $date $time $mta.name($1,$2)
         !writeini -n "MTAbans.ini" bannedip $mta.name($1,%b) $mta.ip($1,%b) $date $time $mta.name($1,$2)
         !writeini -n "MTAbans.ini" main $mta.name($1,%b) 4
         !writeini -n "data.ini" ip $gettok($mta.ip($1,$2),1-2,46) $mta.name($1,%b)
         mta.ban $1 %b
       }
     }
     elseif $3 == !blacklist {
       if %b == -1 mta.say $1 Error - Invalid ID
       else mta.say $1 $mta.name($1,%b) - Added to the Blacklist
       !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.ip($1,%b) 1
       !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.name($1,%b) 1
       !writeini -n "blacklist.ini" $mta.name($1,%b) $gettok($mta.ip($1,$2),1-2,46) 1
       mta.ban $1 %b          
     }
   }
 }
}
on *:SIGNAL:mta.join: {
 if ($gettok($mta.ip($1,$2),1-2,46)) && $readini(data.ini,shortip,$gettok($mta.ip($1,$2),1-2,46)) { 
   mta.say $1 Warning: $mta.name($1,$2) - First 2 ip groups match $readini(data.ini,ip,$gettok($mta.ip($1,$2),1-2,46)), who was banned. $+
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$mta.ip($1,$2)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$mta.name($1,$2)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
 if ($readini(blacklist.ini,$mta.name($1,$2),$gettok($mta.ip($1,$2),1-2,46)) == 1) { 
   mta.say $1 $mta.name($1,$2) Reason: Blacklisted
   mta.ban $1 $2 
 }
}

that has nothing to do with autokicking carn00bs straight when they carn0b sum1. I know how to do that

Link to comment

For you Jakkass :wink:

on *:SIGNAL:mta.command:{
 elseif $3 == !carkill {
   if $4 == on {
     !writeini "options.ini" main carkick 1
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ '
   }
   if $4 == off {
     !writeini "options.ini" main carkick 0
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ '
   }
 }
}
on *:SIGNAL:mta.kill:{
 if ($readini(options.ini,main,carkick) == 1) {
   if $mta.game($1) == GTA:VC && $4 == 39 && $ini($mta.dir $+ $1.ini,ID $+ $3) {
     mta.say $1 Kicking $+(',$mta.name($1,$3),') for Car Killing.
     mta.kick $1 $3
   }
 }
}

Link to comment

For GTA3 :wink:

on *:SIGNAL:mta.command:{ 
 elseif $3 == !carkill { 
   if $4 == on { 
     !writeini "options.ini" main carkick 1 
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ ' 
   } 
   if $4 == off { 
     !writeini "options.ini" main carkick 0 
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ ' 
   } 
 } 
} 
on *:SIGNAL:mta.kill:{
 if ($readini(options.ini,main,carkick) == 1) {
   if $mta.game($1) == GTA3 && $4 == 39 && $ini($mta.dir $+ $1.ini,ID $+ $3) {
     mta.say $1 Kicking $+(',$mta.name($1,$3),') for Car Killing.
     mta.kick $1 $3
   }
 }
}

Link to comment
i suppose i could add that to grs... well i can see how well it works anyways

Add my Advanced Ban Scripts too :P :P :P

Jakkas,

You know MTA:LC ( Multi Theft Auto Liberty City Mod ) ? You can play all the map, and the car of GTA3 as change to car of Vice City....

Try It ;)

Link to comment
For GTA3 :wink:

on *:SIGNAL:mta.command:{ 
 elseif $3 == !carkill { 
   if $4 == on { 
     !writeini "options.ini" main carkick 1 
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ ' 
   } 
   if $4 == off { 
     !writeini "options.ini" main carkick 0 
     mta.say $1 Carkill Kicker set to ' $+ $4 $+ ' by ' $+ $mta.name($1,$2) $+ ' 
   } 
 } 
} 

i like the elseif at the start of mta.command :roll:

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...