Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

Posted
isin searches for that exact string in the name, whereas iswm is a wildcard.

doesnt that mean the same thing?

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

if hello isin $1-

This means if the string "hello" is in the whole sentence.

if hello* iswm $1-

this means if the sentence STARTS with "hello"

Posted

depends what u want...

for example, if u want something to be in the form of an IP adress... u could use:

if *.*.*.* iswm $1-

u cant do that as easily with isin ;)

Posted

on *:SIGNAL:mta.join:{

if MTAPlayer* iswm $1-

mta.kick $1 $2

}

ja? i fucking hate those nubs who dont change their name before they play.

Posted
on *:SIGNAL:mta.join:{ 
 if (MTAPlayer == $2) { mta.kick $1 $2 }
} 

That would be better :P

 if (MTAPlayer == $mta.name($1,$2)) { mta.kick $1 $2 }
} 

;-)

Posted

Here's a nice (cpu hungry) script to whisper to people near you.

alias whisper.distance { 
 var %x,%y,%z 
 %x = $abs($calc($1 - $2)) 
 %y = $abs($calc($3 - $4)) 
 %z = $abs($calc($5 - $6)) 
 !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) 
} 
on *:SIGNAL:mta.pm:{ 
 if ($3 == whisper) { 
if ($mta.admin+($1) == $true) {
   var %a = 0 
   unset %b 
   while %a < $mta.maxplayers($1) { 
     if (($whisper.distance($mta.location($1,$2,x),$mta.location($1,%a,x),$mta.location($1,$2,y),$mta.location($1,%a,y),$mta.location($1,$2,z),$mta.location($1,%a,z)) <= %whisper) && (%a != $2) && ($mta.name($1,%a) != Unknown)) { 
       mta.msg $1 %a Whisper from $mta.name($1,$2) $+ : $4- 
       %b = $iif($chr(44) !isin %b,$mta.name($1,%a),%b $+ $chr(44) $chr(32) $mta.name($1,%a)) 
     } 
     !inc %a 
   } 
   mta.msg $1 $2 Message delivered to $iif(%b,%b,no-one) 
   unset %a 
   unset %b 
 } 
}
} 

Use "/msg whisper "

Posted

ive seen DJMills script, and he has the same idea except its for the distance between your charachter and a cop and u become wanted, its a cool feature.

Posted

It's a script that messages people within 50 m (or was it feet?)

Think of it as a yell the player makes, it's only heard in a 50 m radius. I think it's pretty kool script.

Posted

-not mtama scripting anymore-

Guys, no offence, but this tpoic is huge allready... with all this offtopic crap it wont be of ANY use anymore

Ergo:

CUT THE CRAP!

To any mod: lock the thread and start a fresh, moderated one ;)

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

    • No registered users viewing this page.

×
×
  • Create New...