Au{R}oN Posted June 16, 2005 Share Posted June 16, 2005 Hi guys, I've a little question. How can I make a script wich ban the players with a specific name. An example: Cheaer joined. Cheater has been banned from the server. Reason: Black List Thanks Link to comment
XcR Posted June 17, 2005 Share Posted June 17, 2005 on *:SIGNAL:mta.join:{ ;the join signal that is triggered when a player enters the server if ($mta.name($1,$2) == Cheater) { ;checking if their name is Cheater mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server mta.ban $1 $2 ;bans the player } elseif ($mta.name($1,$2) == Cheater2) { ;checking if their name is Cheater2 mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server mta.ban $1 $2 ;bans the player } elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server mta.ban $1 $2 ;bans the player } } tokens can also be used.. Link to comment
andeh Posted June 17, 2005 Share Posted June 17, 2005 on *:SIGNAL:mta.join:{ if ($mta.name($1,$2) == $readini(Bans.ini,bannned,names)) { mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted. mta.ban $1 $2 } } on *:SIGNAL:mta.command:{ if $3 == !addban && $findtok(ADMIN NAMES HERE!!!,$mta.name($1,$2),1,32) { if $4 == $null mta.say $1 say !addban else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $readini(bans.ini,banned,names) $+($4,$chr(44)) } } if $3 == !remban && $findtok(ADMIN NAMES HERE!!!,$mta.name($1,$2),1,32) { if $4 == $null mta.say $1 say !remban elseif ($readini(bans.ini,banned,names,$4) == $null) mta.say $1 $4 isn't banned. else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44) } } } use !addban to add bans use !remban to remove bans You must edit "ADMINS NAMES HERE!!!" to your name!!! Link to comment
MrJax Posted June 17, 2005 Share Posted June 17, 2005 on *:SIGNAL:mta.join:{ if ($findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),44)) { mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted. mta.ban $1 $2 } } on *:SIGNAL:mta.command:{ if ($3 == !addban && $findtok(admin-names,$mta.name($1,$2),1,32)) { if ($4 == $null) mta.say $1 say !addban else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $addtok($readini(bans.ini,banned,names),$4,44) } } elseif ($3 == !remban && $findtok(admin-names,$mta.name($1,$2),1,32)) { if ($4 == $null) mta.say $1 say !remban elseif (!$readini(bans.ini,banned,names,$4)) mta.say $1 $4 isn't banned. else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44) } } } There's many easier ways to do this, but i thought i'd just fix this one Link to comment
Au{R}oN Posted June 17, 2005 Author Share Posted June 17, 2005 Thanks a lot, but I prefer the first one. Last question: can the script be more specific? I've tested it: Cheater is in the blacklist, I enter with the name Cheat, and the script ban me Link to comment
Jani Posted June 17, 2005 Share Posted June 17, 2005 yes, thats what the * and iswm does. to be honest, you should use the !blacklist command in GRS. Link to comment
FBI_Master Posted June 17, 2005 Share Posted June 17, 2005 yes i argree the black list is best Link to comment
XcR Posted June 17, 2005 Share Posted June 17, 2005 Thanks a lot, but I prefer the first one. andy n jax: owned Link to comment
Jani Posted June 17, 2005 Share Posted June 17, 2005 lol xcr, you always will be the best Link to comment
Harry Posted June 17, 2005 Share Posted June 17, 2005 AS long as it isnt Andy's version.. He should buy a new keyboard, his spacebar is broken. In other words: where's the indenting? Link to comment
Mike Posted June 17, 2005 Share Posted June 17, 2005 * Mike prods jax with /help $findtok You forgot a parameter, it should be: $findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),1,44) Link to comment
Au{R}oN Posted June 17, 2005 Author Share Posted June 17, 2005 Please guys, I not understood what's the parameters of the precision of the script. I think is this the area to modify, but where? elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server mta.ban $1 $2 ;bans the player } } I'd like to have the max precision Link to comment
MrJax Posted June 17, 2005 Share Posted June 17, 2005 * Mike prods jax with /help $findtokYou forgot a parameter, it should be: $findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),1,44) ...it's not needed Link to comment
Au{R}oN Posted June 17, 2005 Author Share Posted June 17, 2005 * Mike prods jax with /help $findtokYou forgot a parameter, it should be: $findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),1,44) ...it's not needed Can you reply to the precedent post? It's very important Link to comment
andeh Posted June 17, 2005 Share Posted June 17, 2005 Please guys, I not understood what's the parameters of the precision of the script.I think is this the area to modify, but where? elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server mta.ban $1 $2 ;bans the player } } I'd like to have the max precision What the hell you on about boy , this line here, elseif (cheat* iswm $mta.name($1,$2)) { just change the the word "cheat" to what ever you want. so say if you wanted to ban someone who keeps joining the server with "bob1" & "bob2" & "bob3" so you change the word from "cheat" to "bob". ok????? on *:SIGNAL:mta.join:{ if ($findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),44)) { mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted. mta.ban $1 $2 } } on *:SIGNAL:mta.command:{ if ($3 == !addban && $findtok(admin-names,$mta.name($1,$2),1,32)) { if ($4 == $null) mta.say $1 say !addban else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $addtok($readini(bans.ini,banned,names),$4,44) } } elseif ($3 == !remban && $findtok(admin-names,$mta.name($1,$2),1,32)) { if ($4 == $null) mta.say $1 say !remban elseif (!$readini(bans.ini,banned,names,$4)) mta.say $1 $4 isn't banned. else { mta.say $1 added ban name: $4 !writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44) } } } There's many easier ways to do this, but i thought i'd just fix this one pfffff i wrote that in couple of mins in text box, i couldn't be arsed checking what i wrote Because i knew for fact you jax or oli would soon correct me anyway Link to comment
Au{R}oN Posted June 18, 2005 Author Share Posted June 18, 2005 Oh, you are a big! But isn't precise 100% Becouse if I enter with: Cheaterzar, the script ban me, becouse I've the "Cheater" part in the nick. Help. Link to comment
XcR Posted June 18, 2005 Share Posted June 18, 2005 thats what the * iswm is for.. it bans cheat onwards.. Link to comment
Recommended Posts