Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

Posted

alias db {
 if ($2 == on) {
   if ($mta.admin+($1)) {
     mta.say $1 Dystruction derby activated!
     mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
     %derby = 1
     !unset % [ $+ [ $1 ] ]
     !.timerdb 1 60 db $1 start
   }
   else mta.say $1 No admin+ connection!
 }
 elseif ($2 == off) {
   if (%derby) {
     mta.say $1 Dystruction derby deactivated!
     %derby = 0
     !.timerdb off
     !.timerdb2 off
   }
 }
 elseif ($2 == start) {
   if ($numtok(% [ $+ [ $1 ] ],32) < 3) {
     mta.say $1 Not enough players to start: restart.
     mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
     !unset % [ $+ [ $1 ] ]
     !.timerdb 1 60 db $1 start
   }
   else {
     mta.say $1 Time up!
     mta.say $1 The Round begins! (5 mins)
     !.timerdb2 1 300 db $1 stop
   }
 }
 elseif ($2 == stop) {
   var %a = $numtok(% [ $+ [ $1 ] ],32),%b,%c,%d,%e
   while %a > 0 {
     %e = $gettok(% [ $+ [ $1 ] ],%a,32)
     if ($mta.health($1,%e) > $mta.health($1,%b)) {
       if ($mta.health($1,%e) > $mta.health($1,%c)) {
         if ($mta.health($1,%e) > $mta.health($1,%d)) {
           %b = %c
           %c = %d
           %d = %e

         }
         %b = %c
         %c = %e

       }
       %c = %e
     }
     !dec %a
   }
   mta.say $1 Time over!
   mta.say $1 1st: $mta.name($1,%d) ( $+ $mta.health($1,%d) $+ $chr(37) $+ ) 2st: $mta.name($1,%c) ( $+ $mta.health($1,%c) $+ $chr(37) $+ ) 3rd: $mta.name($1,%b) ( $+ $mta.health($1,%b) $+ $chr(37) $+ )
   mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
   set % [ $+ [ $1 ] ]
   !.timerdb 1 60 db $1 start
 }
}

just replace the alias db in the script with the one above and it should work.

- XcR

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

what line do i put into my script so that only a lv5 admin can activate my PSL loaded script (loaded with olis script of course)

4m85g1y.png

Make sure to use the Search feature before posting a new topic.

Click here for detailed MTA: San Andreas server setup guides.

Posted (edited)

meh :P

on *:SIGNAL:mta.command:{
 var %a = $readini($1.ini,ID $+ $2,level)
 if (%a >= 5) {
   if ($3 == !mode) {
     if (*mh iswm $4) mh $5-
     elseif (*ctc iswm $4) ctc $5-
     elseif (*team iswm $4) team $5-
   }
 }
}

Edited by Guest
Posted

Fine :P

on *:SIGNAL:mta.command:{
 var %a = $readini($1.ini,ID $+ $2,level)
 if (%a >= 5) {
   if ($3 == !mode) {
     if (*mh iswm $4) mh $5-
     elseif (*ctc iswm $4) ctc $5-
     elseif (*team iswm $4) team $5-
   }
 }
}

Posted
excuse me guys, there is the script anti flood?An example:

Zitz: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

theres one built into mta

4m85g1y.png

Make sure to use the Search feature before posting a new topic.

Click here for detailed MTA: San Andreas server setup guides.

Posted

if ($readini(shitlist.ini,clanban,clan) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 }

This is work with one clan. I ban more clans and he don't rember the old clan. Can somone fix this, or telll my what the error is ?

(Sorry for my bad english)

OMG!

Posted

on *:SIGNAL:mta.join: {
if ($readini(shitlist.ini,clanban,clan) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan1) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan2) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan3) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan4) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan5) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
}

:o It's a great script :o

OMG!

Posted

Well if u really wanna do it like that at least be smart about it :P

on *:SIGNAL:mta.join: {
 var %a = 1
 while %a <= $ini(shitlist.ini,clanban,0) {
   if $readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2
   }
   !inc %a
 }
}

Proud member of Multi Theft Auto

Founder of Full Metal Jacket

mtateam5fq.png

fmjbar2hk.png

Creator of MTA:mA:GRS

http://www.mtafmj.com

http://www.full-fat.com

Posted

lol

wasnt that one of the 1st scripts ever to be made for mta...

...i remember how it used to keep them damn NBK's off our server :P

edohc.gif

Associate production coordinating directorial associate managing departmental division office supervisor of the international network amalgamation distributors corporation management organizational association of men who like pussy.

Posted
lol

wasnt that one of the 1st scripts ever to be made for mta...

...i remember how it used to keep them damn NBK's off our server :P

No the first script was the !count (down) script :P

"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
Well if u really wanna do it like that at least be smart about it :P

on *:SIGNAL:mta.join: {
 var %a = 1
 while %a <= $ini(shitlist.ini,clanban,0) {
   if $readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2
   }
   !inc %a
 }
}

mIRC Says this: * /if: insufficient parameters (line 845, script2.mrc)

OMG!

Posted

on *:SIGNAL:mta.join: { 
 var %a = 1 
 while %a <= $ini(shitlist.ini,clanban,0) { 
   if ($readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2 
   } 
   !inc %a 
 } 
}

Bracket mismatch, tut tut Oli

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

    • No registered users viewing this page.

×
×
  • Create New...