Jump to content

set level with mtama & some other questions


Lordkire

Recommended Posts

Posted (edited)

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
Posted

If you use MTA:MA's admin system, there are no able to use passwords.

You must use rcon-commands, if you wanna passwords. In MTA:MA are IP protections only, i think.

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

Posted

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?

Posted

How would he know? he is new to coding, thats why he is asking us...

P_X_L, stop the useless posting its not needed, admin have already removed the spam you put all over the quote wall

Posted

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?

Posted

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 :?

Posted
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- $+ " 
 }
}

Posted

Thanks alot!

Turning the repeat function on and off works fine now, but the repeating doesn't work and I still get the error "* /on: not connected to server (line 83, lkserver.mrc)" :(

Posted

hmm you can't have few same signals in one script.

like if you have

on *:SIGNAL:mta.text:{
 blablablabla
}
on *:SIGNAL:mta.text:{
 blablabla
}

the second one won't work

  • Recently Browsing   0 members

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