field33

A auto-nickban (like a MTAPlayer nick)

Recommended Posts

Can anybody make a auto-nickban like if anybody is MTAPlayer. Can anybody help me?

Share this post


Link to post

on *:SIGNAL:mta.join:{
 if ($mta.name($1,$2) == MTAPlayer) mta.ban $1 $2
}

Like that? :roll:

Share this post


Link to post
on *:SIGNAL:mta.join:{
 if ($mta.name($1,$2) == MTAPlayer) mta.ban $1 $2
}

Like that? :roll:

Yes, thanks!

Share this post


Link to post

isnt ban a little over the top? , you could give them a message to change there name and just kick em

Share this post


Link to post

best way prob is to have when join

player you have 30 seconds to change name or you will be kicked

then after 30 seconds they are kicked

Share this post


Link to post

best thing to do is set up a list of names you don't want people to use, and save it into a file. then get a script to read the file and check if the name's banned on join. something like:

on *:SIGNAL:mta.join:{
if $readini($rpg.dir $+ badnicks.ini,illegal,$mta.name($1,$2)) == 1 {
mta.msg $1 $2 $mta.name($1,$2) is a forbidden name on this server, please change it via the options tab!
mta.kick $1 $2
}
}
...

and then make a file called badnicks.ini and keep this as the content:

[illegal]

MTAPlayer=1

(other names)=1

...

the reason i put the =1 bit in was so that you could use the file for other stuff as well like if you made a script to allow/disallow the nickname etc. :P

Share this post


Link to post
best thing to do is set up a list of names you don't want people to use, and save it into a file. then get a script to read the file and check if the name's banned on join. something like:

on *:SIGNAL:mta.join:{
if $readini($rpg.dir $+ badnicks.ini,illegal,$mta.name($1,$2)) == 1 {
mta.msg $1 $2 $mta.name($1,$2) is a forbidden name on this server, please change it via the options tab!
mta.kick $1 $2
}
}
...

and then make a file called badnicks.ini and keep this as the content:

[illegal]

MTAPlayer=1

(other names)=1

...

the reason i put the =1 bit in was so that you could use the file for other stuff as well like if you made a script to allow/disallow the nickname etc. :P

could you add a 30 second timer to that then it will be great

Share this post


Link to post
on *:SIGNAL:mta.join:{
if $readini($rpg.dir $+ badnicks.ini,illegal,$mta.name($1,$2)) == 1 {
mta.msg $1 $2 $mta.name($1,$2) is a forbidden name on this server, please change it via the options tab!
!.timer 1 30 mta.kick $1 $2
}
}

Share this post


Link to post
isnt ban a little over the top? , you could give them a message to change there name and just kick em

Quite the same result, if you scriptban the name MTAPlayer only then they would get kicked(+namebanned) from the server if they have that nick, if you kick them with a message its the same result.

Share this post


Link to post

He thought he wanted to actually ban people with a certain nick, as did I.

Easiest way is to list the names in a text file and use:

on *:SIGNAL:mta.join:{
 if ($read(bannednames.txt, s, $mta.name($1,$2))) {
   mta.msg $1 $2 
   $+(!.timerbannedname,$1,$2) 1 15 mta.kick $1 $2
 }
}
on *:SIGNAL:mta.part:{
 if ($timer($+(bannedname,$1,$2))) $+(!.timerbannedname,$1,$2) off
}

Share this post


Link to post

Don't start the flaming with me retard.

I was testing something on the account, that's why I posted something small.

You can't exactly criticize how I post, when you're the one who confuses people into thinking that you're speaking arabic.

I've only been posting on this forum for about a week or so now, for the first time in quite a while. So god knows how you made up that bullshit that you posted. And also, if that's so, quote something that seems bs to you...

[/end]

Share this post


Link to post
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.