Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

I think it should. I suggest using elseif, that's a bit faster

(if the mirc compiler is smart enough)

If this didn't work, count the balance between { and } .. one mistake, and you're whole script might be broken

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

Top Posters In This Topic

Top Posters In This Topic

thx opium, I gave it a try and am puzzled, this is what I have now. countdown still working.

alias mta.start { 

} 
alias mta.join { 



} 
alias mta.text { 

 if (!count* isin $3) { 
   mta.say $1 Countdown! 
   .timerc1 1 1 mta.say $1 5 
   .timerc2 1 2 mta.say $1 4 
   .timerc3 1 3 mta.say $1 3 
   .timerc4 1 4 mta.say $1 2 
   .timerc5 1 5 mta.say $1 1 
   .timerc6 1 6 mta.say $1 GO GO GO! 
 } 
 elseif (!rules* isin $3) { 
   mta.say $1 Rules 
   .timerc1 1 1 mta.say $1 No Killing 
   .timerc2 1 2 mta.say $1 No Jacking 
   .timerc3 1 3 mta.say $1 Dont Be an Ass 
   .timerc4 1 4 mta.say $1 Have Fun 
   .timerc5 1 5 mta.say $1 Mod all you want 
 } 

thats the whole script.

Link to comment

alias mta.start { 

} 
alias mta.join { 

} 
alias mta.text { 

 if (!count isin $3) { 
   mta.say $1 Countdown! 
   .timerc1 1 1 mta.say $1 5 
   .timerc2 1 2 mta.say $1 4 
   .timerc3 1 3 mta.say $1 3 
   .timerc4 1 4 mta.say $1 2 
   .timerc5 1 5 mta.say $1 1 
   .timerc6 1 6 mta.say $1 GO GO GO! 
 } 
 elseif (!rules isin $3) { 
   mta.say $1 Rules 
   .timerc1 1 1 mta.say $1 No Killing 
   .timerc2 1 2 mta.say $1 No Jacking 
   .timerc3 1 3 mta.say $1 Dont Be an Ass 
   .timerc4 1 4 mta.say $1 Have Fun 
   .timerc5 1 5 mta.say $1 Mod all you want 
 }
}

LOVE the rules btw

Edited by Guest
Link to comment
isin means if the text left of isin is contained within the function on the right of the isin.

So the command reacts on:

!countdbsivbsdkjvkjd

dhvgiudhbiv!count

ijrnbivfjrniovn!countneijrwngivjrnfv

and not on:

!cou nt

!counhviehdnviurent

bfbgf!cohviehuntbfdbfd

Link to comment

Hi all

If i see these script

if (($chr(1) isin $mta.name($1,$2)) || ($chr(255) isin $mta.name($1,$2)) || ($chr(7) isin $mta.name($1,$2))) {

mta.say $1 $mta.name($1,$2) Reason: Color Codes

mta.kick $1 $2

}

mta.say $1 $mta.name($1,$2) Reason: Color Codes

is it poseble to use color codes in a mta game :?:

if yes how can i use these codes

Grz Michael / (ZC)James

MTA : 82.161.1.22 port 2003

Web (NL) mta.fastphp.nl

The server i al little laggie :wink: yea sorry i am downloading :lol:

Link to comment

k I got the rules thing and countdown sorted,

Is there a script to kick/ban someone if they have a certain amount of kills?

(stunt mode dont worry :lol: )

That way if im not there those asses who kill people with the heli blades and stuff wont last as long as they hoped.

Link to comment
Hi all

If i see these script

if (($chr(1) isin $mta.name($1,$2)) || ($chr(255) isin $mta.name($1,$2)) || ($chr(7) isin $mta.name($1,$2))) {

mta.say $1 $mta.name($1,$2) Reason: Color Codes

mta.kick $1 $2

}

mta.say $1 $mta.name($1,$2) Reason: Color Codes

is it poseble to use color codes in a mta game :?:

if yes how can i use these codes

Grz Michael / (ZC)James

MTA : 82.161.1.22 port 2003

Web (NL) mta.fastphp.nl

The server i al little laggie :wink: yea sorry i am downloading :lol:

yes, on a windows operated server, not linux, but aeron dont like them :P

Link to comment
Hi all

If i see these script

if (($chr(1) isin $mta.name($1,$2)) || ($chr(255) isin $mta.name($1,$2)) || ($chr(7) isin $mta.name($1,$2))) {

mta.say $1 $mta.name($1,$2) Reason: Color Codes

mta.kick $1 $2

}

mta.say $1 $mta.name($1,$2) Reason: Color Codes

is it poseble to use color codes in a mta game :?:

if yes how can i use these codes

Grz Michael / (ZC)James

MTA : 82.161.1.22 port 2003

Web (NL) mta.fastphp.nl

The server i al little laggie :wink: yea sorry i am downloading :lol:

yes, on a windows operated server, not linux, but aeron dont like them :P

Color codes disabled in 0.3.1 servers xD

Link to comment
k I got the rules thing and countdown sorted,

Is there a script to kick/ban someone if they have a certain amount of kills?

(stunt mode dont worry :lol: )

That way if im not there those asses who kill people with the heli blades and stuff wont last as long as they hoped.

lol, yeah its similar to banning someone for having a certain name:

under alias mta.kill put this:

if $mta.kills($1,$3) >= 10 mta.ban $1 $3

that would work for 10 or more kills

Link to comment

Hi all,

i cannot write scripts... but i tried and....

alias mta.kill {
 if (($mta.kills($1,$3) == 30) && ($mta.deaths($1,$2) == 00)) 
 mta.say $1 $mta.name($1,$2) you are suspected use cheats (reason: 30 kills and 0 deaths), if I am mistaken , sorry !
 mta.kick $1 $2
 }

..and nothing.. this doesn't work ! :(

Can you help me ?? :D:D

Link to comment

try this:

alias mta.kill { 
 if (($mta.kills($1,$3) == 30) && ($mta.deaths($1,$3) == 0)) { 
 mta.say $1 $mta.name($1,$3) you are suspected use cheats (reason: 30 kills and 0 deaths), if I am mistaken , sorry ! 
 mta.kick $1 $3 
 }
}

Link to comment
try this:

alias mta.kill { 
 if (($mta.kills($1,$3) == 30) && ($mta.deaths($1,$3) == 0)) { 
 mta.say $1 $mta.name($1,$3) you are suspected use cheats (reason: 30 kills and 0 deaths), if I am mistaken , sorry ! 
 mta.kick $1 $3 
 }
}

utopia will get banned with that script too much...moving on :P

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

    • No registered users viewing this page.

×
×
  • Create New...