Jump to content
  • 0

Auto ban a player with "GM" in the name


Question

Posted

hmmm ..

 

Normal Account creating a GM named character like GM Test , Admin Test and so on = auto ban ..

 

when he create a GM named character and he connects in game in a few second he will be disconnected and when he login again his account will be banned ..

14 answers to this question

Recommended Posts

Posted
OnPCLoginEvent:
if( !getgmlevel() && compare( strcharinfo(0),"GM " ) ){
    mes "You cant use 'GM' in your name.";
    sleep2 3000;
    atcommand "@ban "+strcharinfo(0);
}
end;

try this

Posted

its not working si emistry ..

 

hmm .. i want this way .. if you create GM named character at 1st it can connect in game but in a few second you will get disconnected and when you logged in again your account will be banned automatically

Posted

Try :

-    script    Sample    -1,{
    OnPCLoginEvent:
        if ( !getgmlevel() && compare(strcharinfo(0), "GM ") ) {
            mes "You can't use GM in your name.";
            sleep2 3000;
            atcommand "@block " +strcharinfo(0);
        }
        end;
}
Posted


- script Sample -1,{

OnPCLoginEvent:

if ( !getgmlevel() && compare(strcharinfo(0), "GM ") ) {

if ( getd( ".account_"+ getcharid(3) ) )// 2nd log -> ban

atcommand "@ban " + strcharinfo(0);

else {

setd ".account_"+ getcharid(3), 1;

mes "You can't use GM in your name.";

sleep2 3000;

atcommand "@kick " +strcharinfo(0);

}

}

end;

}

Posted

the example was right, compare return true if the substring is in the main string

 

@Sparks

from my test this script seems working... weird

 

when i put it on so i need to @loadnpc npc/blah/blah/blah/ban.txt

then now scripts is loaded when i create a GM named character on my normal account it doesnt do anything .. the acc did not get ban .. :(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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