Jump to content

set level with mtama & some other questions


Lordkire

Recommended Posts

Sorry if this is a stupid question but i only started programming scripts today...

There is this $mta.level(Server,PlayerID) thing that tells you the level of players, but is there a way to set this level (for example when a player types "!pass mypass")?

I couldn't find anything in the scripting.html file.

[edit]I also have an other question: is there a function to scange a player's nickname? I don't think so hu?

Edited by Guest
Link to comment
Sorry if this is a stupid question but i only started programming scripts today...

There is this $mta.level(Server,PlayerID) thing that tells you the level of players, but is there a way to set this level (for example when a player types "!pass mypass")?

Yea you need to write the script yourself.

I also have an other question: is there a function to scange a player's nickname? I don't think so hu?

No.

Link to comment

Thanks alot!

So in fact $mta.level(Server,PlayerID) is quite useless?

I made this script now but it doesn't work:

%repeat = 0
on *:SIGNAL:mta.command: {
 if ($3 == !repeat) {
   if ($mta.level($1,$2) > 4 && $4 == 1) {
     %repeat = 1
     mta.text $1 The repeat function is now on.
   }
   elseif ($mta.level($1,$2) > 4 && $4 == 0) {
     %repeat = 0
     mta.text $1 The repeat function is now off.
   }
   elseif ($mta.level($1,$2) > 4 && $4 !== 0 && $4 == 1) {
     mta.text $1 Only use "!repeat 1" to turn on and "!repeat 0" to turn off.
}
   else {
     mta.text $1 You need to be admin level 5 or more to use this function!
   }
 }
}
on *:SIGNAL:mta.text: {
 if (%repeat == 1) {
   mta.text $1 $mta.nick($1,$2) just said: "$3"
 }
}

Do u guys see what's wrong?

Link to comment

guys if you can't help, better don't post at all. Cause when you start a topic you expect everybody to come and help you, but when somebody else starts a topic asking for help, you just say "do it yourself" :?

Lordkire, you're making a script for mta:sa or 0.5? and what that repeat script is supposed to do?

Link to comment

The script is for MTA SA.

And it's suposed to repeat everything ppl say in the server if an admin (lvl 5) turns it on using !repeat 1. An admin can also turn it off again using !repeat 0. So it's quite useless :P.

And you also might need to know that I get the message "* /on: not connected to server (line 60, lkserver.mrc)" in my main mIRC window. And line 60 contains "on *:SIGNAL:mta.text: {"

@[FIN]P_X_L: I tested the script and I saw something is wrong, but I can't find what, so that's why I'm posting it here.

[edit] got an other question: how do i check wether a variable is set?

if ($4 == ) {} doesn't work and if ($4 == *) doesn't work either :?

Link to comment
on *:SIGNAL:mta.command:{
 if ($3 == !repeat) {
   if ($mta.level($1,$2) >= 5) {
     if (($4 == 0) || ($4 == 1)) {
       set %repeat $4
       mta.text $1 The repeat function is now $iif($4 == 1,on,off). 
     }
     else mta.text $1 Only use "!repeat 1" to turn on and "!repeat 0" to turn off.
   }
   else mta.text $1 You need to be admin level 5 or more to use this function!
 }
}
on *:SIGNAL:mta.text:{
 if (%repeat == 1) {
   mta.text $1 $mta.nick($1,$2) just said: " $+ $3- $+ " 
 }
}

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...