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

av.png

  • 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.

apeblood2.jpg
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

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

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?

apeblood2.jpg
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

"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

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:

elseif ($3 == !offtropic ) {

mta.say $1 That's offtropic mta.name( $2 , $4 )

mta.kick $1 $4

}

elseif ($3 == !EN ) {

mta.say $1 Hi all, Sorry for my bad english :S

mta.ban $1 $4

}

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.

apeblood2.jpg
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

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

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

y wer colour codes disabled?

annoying, the ingame chat is like a rainbow then

tantsusaali astun ja naudin seda biiti,

ilusad naised versus hunnik tselluliiti

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

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

plmta.png

fmj.png

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

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

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

    • No registered users viewing this page.

×
×
  • Create New...