Lordkire Posted December 20, 2006 Share Posted December 20, 2006 (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 December 21, 2006 by Guest Link to comment
SanZoR.Sr Posted December 20, 2006 Share Posted December 20, 2006 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. Link to comment
B@TM@N Posted December 20, 2006 Share Posted December 20, 2006 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
Lordkire Posted December 20, 2006 Author Share Posted December 20, 2006 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
lil Toady Posted December 20, 2006 Share Posted December 20, 2006 you're making a script for mta:sa or mta0.5? Link to comment
SanZoR.Sr Posted December 20, 2006 Share Posted December 20, 2006 Test it yourself =D Then you see is anything wrong - pixie Link to comment
Brophy Posted December 20, 2006 Share Posted December 20, 2006 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 Link to comment
lil Toady Posted December 20, 2006 Share Posted December 20, 2006 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
Lordkire Posted December 20, 2006 Author Share Posted December 20, 2006 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 . 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
lil Toady Posted December 21, 2006 Share Posted December 21, 2006 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
Lordkire Posted December 21, 2006 Author Share Posted December 21, 2006 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)" Link to comment
lil Toady Posted December 21, 2006 Share Posted December 21, 2006 heh, something wrong with your mirc i suppose, or you put the script wrong Link to comment
Lordkire Posted December 21, 2006 Author Share Posted December 21, 2006 Is there a special order you need to put the 'on ...' things in because i moved that part to an other place and now it works fine Link to comment
lil Toady Posted December 21, 2006 Share Posted December 21, 2006 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 Link to comment
Lordkire Posted December 21, 2006 Author Share Posted December 21, 2006 yeah that's what the 'event check' button is for, isn't it? But i didn't have any double events. Link to comment
Recommended Posts