Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

Posted

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

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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.

Posted (edited)

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
Posted

hmm couldnt get it to work, thanks any way guys and Aeron, great little tool you made there :D

edit: what does the "isin" part stand for?

Posted

isin means if the text left of isin is contained within the function on the right of the isin.

Posted
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

Posted

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:

Posted

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.

Posted
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

Posted
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

Posted

*crys, man i know it makes them kind of unstable, but it should at least be a option for servers, dont disable them all together :cry:

Posted
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

Posted

hehe, hippy style huh, so if they was removed....is there much point in keeping this script

 elseif ($chr(1) isin $mta.name($1,$2)) { 
   mta.say $1 $mta.name($1,$2), color codes are not allowed on this server, please remove them before joining
   mta.kick $1 $2 
 } 

Posted

it can be quite funny, i made a colour coded manhunt once when bored lol... got it somewhere

Posted

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

Posted

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 
 }
}

Posted
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

Posted

I would love that one.. Let me know what server it's on might have to try and start the "script thinks Im a cheater" club. You can do it if your careful and just pick your shots... almost no chance in a stubby war. Would suck if you didnt cheat or see it coming thou.

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

    • No registered users viewing this page.

×
×
  • Create New...