Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

ok so far i have:

elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) {

%a = $iif($4 !isnum,$mta.getid($1,$4),$iif($mta.name($1,$4) != unknown,$4,-1))

if (%a == $2) mta.msg $1 $2 You cannot kick yourself!

elseif ($mta.name($1,%a) == unknown) mta.msg $1 $2 Invalid ID/Name

else {

mta.say $1 $mta.name($1,$2) has kicked $mta.name($1,%a) $+ . Reason: $5-

set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name($1,$2)) + 1)

!writeini -n "MTAscript.ini" kicks $mta.name($1,$2) %kicks

echo -a Server $1 $+ : $mta.name($1,$2) kicked nr. %kicks

mta.kick $1 %a

}

unset %a

}

works n stuff, but not wildcards!

Link to comment
elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { 
 var %a = $iif($4 !isnum,$mta.getid($1,$4),$iif($mta.name($1,$4) != unknown,$4,-1)) 
 if (%a == $2) mta.msg $1 $2 You cannot kick yourself! 
 elseif %a == -1 mta.msg $1 $2 Invalid ID/Name 
 else { 
   mta.say $1 $mta.name($1,$2) has kicked $mta.name($1,%a) $+ . Reason: $5- 
   !set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name($1,$2)) + 1) 
   !writeini -n "MTAscript.ini" kicks $mta.name($1,$2) %kicks 
   !echo -a Server $1 $+ : $mta.name($1,$2) kicked nr. %kicks 
   !mta.kick $1 %a 
 }
}

Link to comment
elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { 
 var %a = $iif($4 !isnum,$mta.getid($1,$4),$iif($mta.name($1,$4) != unknown,$4,-1)) 
 if (%a == $2) mta.msg $1 $2 You cannot kick yourself! 
 elseif %a == -1 mta.msg $1 $2 Invalid ID/Name 
 else { 
   mta.say $1 $mta.name($1,$2) has kicked $mta.name($1,%a) $+ . Reason: $5- 
   !set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name($1,$2)) + 1) 
   !writeini -n "MTAscript.ini" kicks $mta.name($1,$2) %kicks 
   !echo -a Server $1 $+ : $mta.name($1,$2) kicked nr. %kicks 
   !mta.kick $1 %a 
 }
}

nope, still doesnt work with wildcard.

Link to comment

elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { 
%b = $iif($4 isnum,$4,$mta.getid($1,$4))
 if (%b == $2) mta.msg $1 $2 You cannot kick yourself! 
 if ($mta.name($1,%b) == Unknown) mta.say $1 Error on User ID/Name. 
 else { 
   mta.say $1 $mta.name($1,$2) has kicked $mta.name($1,%b) $+ . Reason: $5- 
   set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name($1,$2)) + 1) 
   writeini -n "MTAscript.ini" kicks $mta.name($1,$2) %kicks 
   echo -a Server $1 $+ : $mta.name($1,$2) kicked nr. %kicks 
   mta.kick $1 %b 
 } 
} 

Try this.

Link to comment

here can you check this it wont run :

alias mta.moneycheck {

set %id 0

while ( $mta.maxplayers($1) > %id ) {

%money = $mta.money($1,%id)

if (%money > 20000) {

/mta.kick $1 %id

}

%id = %id + 1

}

unset %id

}

on *:SIGNAL:mta.command: {

if ($3 == !moneycheck-on) {

mta.say $1 MoneyCheck on...

.timerchkmoney 0 20 mta.moneycheck

}

elseif ($3 == !moneycheck-off) {

/mta.say $1 MoneyCheck off...

/.timerchkmoney off

}

}

Link to comment
alias mta.moneycheck { 
 var %a = 0
 while %a <= $mta.maxplayers($1) {
   if ($mta.money($1,%a) > 20000) { mta.kick $1 %a } 
   !inc %a
 }
} 

on *:SIGNAL:mta.command: { 
 if ($3 == !moneycheck-on) { 
   mta.say $1 MoneyCheck on... 
   !.timerchkmoney 0 20 mta.moneycheck $1
 } 
 elseif ($3 == !moneycheck-off) { 
   mta.say $1 MoneyCheck off... 
   !.timerchkmoney off 
 } 
}

Link to comment

Hi guys, i am italian.

I have a question. At page 63 i found this script:

 alias mta.command { 
if ($3- == !chkhp $4 && %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { 
 if ($mta.status($1,$4).text == In game) { 
  if ($mta.vehicle($1,$4) == 0) { 
  !.timer 1 0.1 mta.say $1 checking $mta.name($1,$4) for health cheat. 
  !timer 1 1 mta.chkhp $1 $4 $mta.health($1,$4) 
  !.timer 1 0.1 mta.slap $1 $4 
 } 
 else !timer 1 0.1 mta.say $1 $mta.name($1,$4) is in a vehicle, cannot perform check! 
 } 
} 

alias mta.chkhp { 

;!timer 1 0.1 mta.say $1 current health: $mta.health($1,$2) previous: $3 
if ($mta.health($1,$2) < $3) { 
!timer 1 0.1 mta.say $1 $mta.name($1,$2) IS NOT using a health cheat! 
} 
else { 
!timer 1 0.1 mta.say $1 Banning $mta.name($1,$2) $+ , Reason: Health Cheat detected! 
!timer 1 1 mta.ban $1 $2 CHKHP: Health cheat 
} 
}

DJ-Mills: !chkhp 0 
Admin slaps DJ-Mills. 


By

But now this script not work. Can someone fix it for 3.17 version? Is too useful for me, thanks

Link to comment

Try this

alias mta.chkhp {
!timer 1 0.1 mta.say $1 current health: $mta.health($1,$2) previous: $3
if ($mta.health($1,$2) < $3) {
!timer 1 0.1 mta.say $1 $mta.name($1,$2) IS NOT using a health cheat!
}
else {
!timer 1 0.1 mta.say $1 Banning $mta.name($1,$2) $+ , Reason: Health Cheat detected!
!timer 1 1 mta.kick $1 $2 CHKHP: Health cheat
}
} 

on *:SIGNAL:mta.command: {
if ($3 == !chkhp) && ($mta.status($1,$4).text == In game) && ($mta.vehicle($1,$4) == 0) {
 !.timer 1 0.1 mta.say $1 checking $mta.name($1,$4) for health cheat. 
  !timer 1 1 mta.chkhp $1 $4 $mta.health($1,$4)
  !.timer 1 0.1 mta.slap $1 $4
}
}

Link to comment
Pls guys, i need this script:

Julio:!about

Cheater: MTA Exploit panel etc etc.

Where can i find it?

wtf???

do you mean this:

on *:SIGNAL:mta.command:{

if ($3 == !about) {

mta.say $1 Cheater: MTA Exploit panel etc etc.

}

}

:roll:

lmfao hahaha i dont think hes too good at english lmao

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

    • No registered users viewing this page.

×
×
  • Create New...